Page 1 of 1
View shaping for Ascii Export
Posted: Mon Nov 19, 2012 8:44 am
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 (6.65 KiB) Viewed 3296 times
Re: View shaping for Ascii Export
Posted: Mon Nov 19, 2012 9:02 am
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.
Re: View shaping for Ascii Export
Posted: Mon Nov 19, 2012 9:24 am
by AmbPin
Thanks Duncan,
That is the conclusion I had come to having tried a few different ways.
Re: View shaping for Ascii Export
Posted: Mon Nov 19, 2012 1:57 pm
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.
Re: View shaping for Ascii Export
Posted: Mon Nov 19, 2012 2:25 pm
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.
Re: View shaping for Ascii Export
Posted: Mon Nov 19, 2012 2:46 pm
by David Usherwood
Shame TI won't write XML, so you will be using some scripting anyway.