How to read a text file in process?

Post Reply
les
Posts: 4
Joined: Fri Sep 09, 2011 8:29 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2003

How to read a text file in process?

Post by les »

Good day! Help me please.
I have created a process, the data source is a text file. All the settings I made in the dialog boxes, creating variables, set delimiters.
The process reads data from a file and writes out to another file. It works.
Is it possible to specify a data source, delimiters in the code without dialog boxes? For example using the function:

Code: Select all

strPath = GetProcessErrorFileDirectory;
File = strPath | 'tm1server.log';

DataSourceType='CHARACTERDELIMITED';
DatasourceNameForServer=File;
DatasourceASCIIDelimiter=' ';
DatasourceASCIIQuoteCharacter='';
Is it possible to create variables in the code and write data into them from the source file?
User avatar
Steve Vincent
Site Admin
Posts: 1054
Joined: Mon May 12, 2008 8:33 am
OLAP Product: TM1
Version: 10.2.2 FP1
Excel Version: 2010
Location: UK

Re: How to read a text file in process?

Post by Steve Vincent »

from the source file, no.

you can't use the source file to pass paramaters including the location of the source file if that keeps changing. what you can do is have a config file (or cube view, attributes or anything that can hold what you need) in a static location and use that instead. so one TI can always use the same source, that picks up the various parameters then use that to pass the parameters from the initial TI to the one doing the work.
If this were a dictatorship, it would be a heck of a lot easier, just so long as I'm the dictator.
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
Post Reply