TM1 Server translation

Post Reply
ldwnt
Posts: 5
Joined: Fri May 03, 2013 5:51 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2003

TM1 Server translation

Post by ldwnt »

Hi guys,

Recently I get a task to translate a TM1 Server (including dimensions and attributes, cubes and rules, TI processes, applications) from Japanese to English, and then make it support multi-language. Frankly speaking, I'm totally new to TM1. Based on some learning from TM1 documents, I figure out a plan for the task, but I'm not sure if it's a good way to do it. The plan is as below:
1) export all dimensions and cubes from TM1 Server to flat files automatically using TI processes.
2) extract all Japanese words from the flat files automatically using a script; translate them into English manually to make a dictionary.
3) translate the flat files to English with the dictionary using a script.
4) import the translated flat files to an empty TM1 Server automatically using TI processes.
5) translate the Applications on TM1 Server manually.

I've managed to export & import dimensions (together with attributes, subsets) using processes and to make the dictionary. However, I have some problems here:

1) I can't find a function to output all data from a cube in TI process. Dimension '}Cubes' can be used to enumerate cube names and function TABDIM can be used to enumerate dimension names of a cube, so the structure of all cubes can be exported automatically using these two. But when it comes to the exporting of cube data, I can't find a function to do it. And I can't use the backtracking algorithm + function CellGetN to enumerate all elements in all dimensions, and then export data of all element combinations, since TI process doesn't support arrays. The same situation applies to getting the view structure (which dimensions does the view consist of) and rules info. Does it mean I have to rebuild the cubes & their views, dimensions manually?

2) There are uploaded excels in Applications in Japanese. To support multi-language in excel, all I can think of is to refer to a text alias in TM1 when there is a text in the excel. Again, I can't find a worksheet function to get the alias of an element.

3) To get an 'empty' Server, I copy the folder of an existing TM1 Server, delete all its cubes and dimensions in Architect. I wonder if there is a more 'clean' way to create an empty one?

Please comment if there are existing solutions to these problems. Thanks a lot!

Dawei
lotsaram
MVP
Posts: 3702
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: TM1 Server translation

Post by lotsaram »

You export data out of a cube using the ASCIIOutput function. You can find good resources of pre-built library to export data from any cube and iterate through objects over at http://www.bedrocktm1.org/

However 2 words of caution about your approach.
1/ TM1 is typically used for modelling and reporting of financial data. Although TM1 cubes can contain string data the data in cubes is usually overwhelmingly numeric and universal, it will be the same regardless of language settings. Exporting all cube contents would therefore be a waste of time, processing power and storage. All you should need to translate is the dimension elements or aliases of the elements and maybe some descriptive attributes if these exist.

2/ You (probably) don't need to have a blank server and reimport everything. It is (probably) a better approach to modify the existing server by adding English aliases for the dimensions and just populating these. Then users will be able to choose the display alias (and thereby language) for themselves. You can use a build as you go approach because no existing functionality will be destroyed just new functionality added.

Note however that TM1 doesn't really offer true multi-language support as although all dimension elements can have multiple aliases in multiple languages the object names are fixed as TM1 doesn't support aliases on the dimension and cube names themselves. In the reporting UI be that Excel or BI you can get around this with aliases or text attributes but the pure server explorer and cube viewer is what it is. For an environment that is mainly Excel based you can have a user selected parameter for language that all reports can refer to that in turn drives alias selection. This is what you would do designing a multi-language system from the ground up, but no reason why it can't be retro-fitted.
User avatar
Harvey
Community Contributor
Posts: 236
Joined: Mon Aug 04, 2008 4:43 am
OLAP Product: PA, TM1, CX, Palo
Version: TM1 8.3 onwards
Excel Version: 2003 onwards
Contact:

Re: TM1 Server translation

Post by Harvey »

I'd agree with lotsaram here. If you can avoid renaming dimensions and cubes, do it. It's going to be a lot of work!

If you absolutely have to rename all the cubes and dimensions, using TI isn't a perfect approach. The main reason I say this is that there are certain parts of the model TI does not have access to, so exporting the entire model is impossible.

For example, if a subsets generated with an MDX query string will be lost, because you can only access the result of the MDX query, not the string itself.

Flow has a tool called the Flow Model Packager that allows you to export an entire TM1 model to an XML file.

It is in beta right now, but it covers all aspects of the model and does not miss anything. It also exports cube and dimension names using unique indexes, which means the name only appears once for each object and is referenced by the index. This makes renaming a lot easier.

Edit: additional detail removed at moderator's request.
Take your TM1 experience to the next level - TM1Innovators.net
ldwnt
Posts: 5
Joined: Fri May 03, 2013 5:51 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2003

Re: TM1 Server translation

Post by ldwnt »

lotsaram wrote:You export data out of a cube using the ASCIIOutput function. You can find good resources of pre-built library to export data from any cube and iterate through objects over at http://www.bedrocktm1.org/

However 2 words of caution about your approach.
1/ TM1 is typically used for modelling and reporting of financial data. Although TM1 cubes can contain string data the data in cubes is usually overwhelmingly numeric and universal, it will be the same regardless of language settings. Exporting all cube contents would therefore be a waste of time, processing power and storage. All you should need to translate is the dimension elements or aliases of the elements and maybe some descriptive attributes if these exist.

2/ You (probably) don't need to have a blank server and reimport everything. It is (probably) a better approach to modify the existing server by adding English aliases for the dimensions and just populating these. Then users will be able to choose the display alias (and thereby language) for themselves. You can use a build as you go approach because no existing functionality will be destroyed just new functionality added.

Note however that TM1 doesn't really offer true multi-language support as although all dimension elements can have multiple aliases in multiple languages the object names are fixed as TM1 doesn't support aliases on the dimension and cube names themselves. In the reporting UI be that Excel or BI you can get around this with aliases or text attributes but the pure server explorer and cube viewer is what it is. For an environment that is mainly Excel based you can have a user selected parameter for language that all reports can refer to that in turn drives alias selection. This is what you would do designing a multi-language system from the ground up, but no reason why it can't be retro-fitted.
Hi lotsaram,

Thank you. I go through the Bedrock help file and try its processes. Bedrock does help when exporting cube datas, however, I can't find any process to obtain the structure of a view (which dimension are in the view, which dimensions are in titles/rows/cols, which subset is assigned to the dimension ) or the rules of a cube.

The reason I can't simply add alias and have to rebuild the TM1 server is that: in the new version, the names of the elements / dimension have to be English, so the cubes need to be recreated using English dimensions, too.

I send an email to Bedrock team to ask if they have any method to obtain the structure info.
ldwnt
Posts: 5
Joined: Fri May 03, 2013 5:51 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2003

Re: TM1 Server translation

Post by ldwnt »

Lazarus wrote:I'd agree with lotsaram here. If you can avoid renaming dimensions and cubes, do it. It's going to be a lot of work!

If you absolutely have to rename all the cubes and dimensions, using TI isn't a perfect approach. The main reason I say this is that there are certain parts of the model TI does not have access to, so exporting the entire model is impossible.

For example, if a subsets generated with an MDX query string will be lost, because you can only access the result of the MDX query, not the string itself.

Flow has a tool called the Flow Model Packager that allows you to export an entire TM1 model to an XML file.

It is in beta right now, but it covers all aspects of the model and does not miss anything. It also exports cube and dimension names using unique indexes, which means the name only appears once for each object and is referenced by the index. This makes renaming a lot easier.

Edit: additional detail removed at moderator's request.
Hi, Lazarus, thanks. It seems this tool doesn't support Japanese well. An exception is thrown when documenting a snap containing cubes info whose dimensions are in Japanese.
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: TM1 Server translation

Post by rmackenzie »

ldwnt wrote: I can't find any process to obtain the structure of a view (which dimension are in the view, which dimensions are in titles/rows/cols, which subset is assigned to the dimension ) or the rules of a cube.
There aren't any TI functions to retrieve the view structure parameters, only to set them:
  • ViewColumnDimensionSet
  • ViewColumnSuppressZeroesSet
  • ViewRowDimensionSet
  • ViewRowSuppressZeroesSet
  • ViewSuppressZeroesSet
  • ViewTitleDimensionSet
  • ViewTitleElementSet
You would need, for example, ViewRowDimensionGET.

Also, there's no function to retrieve the rules of a cube.

Given that both .vue and .rux files are stored as plain-text, that is, human readable, you could set the datasource of some TI to those files and then process them. Parsing these files is not an easy exercise though and will require a lot of logic to be programmed.
Robin Mackenzie
User avatar
Harvey
Community Contributor
Posts: 236
Joined: Mon Aug 04, 2008 4:43 am
OLAP Product: PA, TM1, CX, Palo
Version: TM1 8.3 onwards
Excel Version: 2003 onwards
Contact:

Re: TM1 Server translation

Post by Harvey »

Robin is correct, there are many missing functions from TI that will make it very difficult or impossible to get a full export of the entire model. This was the point I tried to make earlier with my MDX subset string example, but he has given much more pertinent examples here.

ldwnt, I'm sorry to hear the Flow Model Packager does not work correctly with Japanese characters. I would be very keen to work on multi-language support, so have sent you a PM to follow up.

Edit: Anyone interested in renaming TM1 objects using the Flow Model Packager, I have written a blog article explaining the steps, with a working example.
Take your TM1 experience to the next level - TM1Innovators.net
User avatar
Harvey
Community Contributor
Posts: 236
Joined: Mon Aug 04, 2008 4:43 am
OLAP Product: PA, TM1, CX, Palo
Version: TM1 8.3 onwards
Excel Version: 2003 onwards
Contact:

Re: TM1 Server translation

Post by Harvey »

In case anyone is interested in getting the additional properties of views, rules, MDX, etc, I have a freeware command line tool that can be called from Turbo Integrator to do the job.

It's a bit of a work around, but will get you the information you need, and might get you out of a sticky spot.

If anyone is interested, drop me a PM, and I'll send you the file and some instructions.
Take your TM1 experience to the next level - TM1Innovators.net
Post Reply