View shaping for Ascii Export

Post Reply
AmbPin
Regular Participant
Posts: 173
Joined: Sat Mar 20, 2010 3:03 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007-10

View shaping for Ascii Export

Post by AmbPin »

Is it possible to influence the order in which you encounter data when using ascii export in a TI process?
If for example we have customer & product dimensions and using a view to define output would it be possible to see the customers grouped by product or the products grouped by customer in the resultant text dependant on how the view is constructed?
Capture.PNG
Capture.PNG (6.65 KiB) Viewed 3298 times
Duncan P
MVP
Posts: 600
Joined: Wed Aug 17, 2011 1:19 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2003 2007
Location: York, UK

Re: View shaping for Ascii Export

Post by Duncan P »

If you are using a view as a data-source for TI, or if you export a view to a text file, all the structure and element order information of the view is ignored. The only things that are used are the sets of elements selected on each dimension and the ViewExtract* options. You will get one column per dimension, in the order in which they appear in the cube, and one additional column for the data value itself.
AmbPin
Regular Participant
Posts: 173
Joined: Sat Mar 20, 2010 3:03 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007-10

Re: View shaping for Ascii Export

Post by AmbPin »

Thanks Duncan,
That is the conclusion I had come to having tried a few different ways.
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: View shaping for Ascii Export

Post by David Usherwood »

I can think of a number of approaches:

a Build a working cube which has the dimensions you are using in the sort order you want and rule or TI the data across;
b Use Powershell for sorting the CSV file;
c Use one of the many scripting languages which would do this (perl, python...)
d Define the CSV file as an ODBC data source and write a script in Excel VBA (or even, maybe, in TI :) ) to read the data source in using an ORDER by query.
AmbPin
Regular Participant
Posts: 173
Joined: Sat Mar 20, 2010 3:03 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007-10

Re: View shaping for Ascii Export

Post by AmbPin »

Thanks David,
I am looking to export the data in XML format so I may well use an extra XSLT transform to shape post TI ascii export.
I just wanted to make sure I hadnt missed an option in being able to shpe the export in TI.
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: View shaping for Ascii Export

Post by David Usherwood »

Shame TI won't write XML, so you will be using some scripting anyway.
Post Reply