256 bytes or 256 characters

Post Reply
kiamkhai
Posts: 19
Joined: Fri Aug 08, 2008 2:42 am

256 bytes or 256 characters

Post by kiamkhai »

The entire string represented by the combinations of the TM1 server data directory name and the TM1 object name is limited to 256 bytes. For e.g. C:\Macroeconomic Data\TM1\ (26 bytes), object name are limited to 230 bytes, inclusive of a file extension such as .cub.

2. Is the above 256 bytes refer to 256 characters? I am a bit confuse with the definition given in the developer guide.

3. What does TM1 Client mean?

Thanks.
User avatar
mattgoff
MVP
Posts: 516
Joined: Fri May 16, 2008 1:37 pm
OLAP Product: TM1
Version: 10.2.2.6
Excel Version: O365
Location: Florida, USA

Re: 256 bytes or 256 characters

Post by mattgoff »

I believe this is is an OS limitation-- TM1 uses cube and dimension names as their file names. As I read the ext3 and Windows specs, they can take 255 characters of UTF-16, so you should be safe if you're using a double-byte character set, but I would probably do some testing if you're going over 127 just to be sure. As far as I know TM1 Client is the same as Architect.

Matt
Please read and follow the Request for Assistance Guidelines. It helps us answer your question and saves everyone a lot of time.
User avatar
Alan Kirk
Site Admin
Posts: 6606
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: 256 bytes or 256 characters

Post by Alan Kirk »

kiamkhai wrote:The entire string represented by the combinations of the TM1 server data directory name and the TM1 object name is limited to 256 bytes. For e.g. C:\Macroeconomic Data\TM1\ (26 bytes), object name are limited to 230 bytes, inclusive of a file extension such as .cub.
2. Is the above 256 bytes refer to 256 characters? I am a bit confuse with the definition given in the developer guide.
3. What does TM1 Client mean?
As Matt mentioned, the 255 character limit is an O/S limitation; it's as long as a full filepath can be in an NTFS file system. (As a side note, Excel files are limited to 218 characters because of the need to allow extra characters for a worksheet reference in a link. You can re-name an Excel file to a path which is longer than 218 characters via Windows Explorer, but you can't save it in Excel with more than 218 characters in the path.)

Why 255 rather than 256? {Jumps into the De Lorean and heads back to a time when I used to code in C...} Because in the C language, strings have a null terminating byte; the 256th character is needed for the null terminator. (In fact if you want to be pendantic C doesn't have strings as a data type, it has null terminated byte arrays. However they can be thought of as "strings" for the purpose of this exercise. Nonetheless, the need for the null terminating byte is doubtless the reason that TI (for example) can handle only 255 characters rather than 256.) This is also why you need to strip off the null terminator if you're getting "strings" from Windows API functions for VB or VBA.

Still, it could be worse; at least the Windows API doesn't use freakin' value capsules.

If you're using a character set in which one character is represented by one byte (such as ASCII), then 256 bytes and 256 characters (or 255 of both, for that matter) will work out to be the same thing. While a single byte character system is sufficient for English, it doesn't work for languages like Japanese / Kanji which need more characters. If you have two bytes to represent each character, you can represent the required characters of pretty much any language. One such double byte character system is Unicode which, as I understand it, will be used in the upcoming 9.F-word version. (I've heard that 9.F-word will also remove the 255 character limit in TM1. We shall see.)

TM1 Client is the add-in that you load into Excel to allow you to work with TM1 data via the Server Explorer, or through (for example) DBRW formulas in Excel worksheets. At its core is the tm1p.xla Excel add-in file. It can be distinguished from TM1 Perspectives and TM1 Architect as follows:
- TM1 Perspectives is intended for Administrators; it allows you to create cubes and dimensions, for example. If you compare the TM1 menu in Excel in Perspectives with that in Client, you'll see some additional items like Dimension Worksheets and Rule Worksheets.
- TM1 Architect doesn't need Excel; it's a self-contained application.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Post Reply