TI DataSourceType variable

Post Reply
jduplessis
Posts: 19
Joined: Tue Sep 16, 2014 11:51 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010
Location: Ottawa, Canada

TI DataSourceType variable

Post by jduplessis »

I am trying to debug an issue in a process which was built by someone else. I am not very strong when it comes to writing TI's and the issue is occurring when the process attempts to set DataSourceType to null see below:

Code: Select all

DataSourceType = 'NULL';
ItemReject( sMessage );
This snippet is executed when a string which is supposed to represent a cube does not exist. However it is killing the process before the error message gets logged.

Is datasourcetype null valid I'm guessing not, should this be set to 'none'?
blackhawk
Community Contributor
Posts: 136
Joined: Thu May 29, 2008 2:29 pm

Re: TI DataSourceType variable

Post by blackhawk »

Why are you trying to set the datasource type? Perhaps a little more of the script may help to understand what you are trying to accomplish?

Switching the datasource type from cube to 'none' has some implications on the variables. It might be better to check the existence of a cube and then execute one process or another depending on that answer using the ExecuteProcess command.
jduplessis
Posts: 19
Joined: Tue Sep 16, 2014 11:51 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010
Location: Ottawa, Canada

Re: TI DataSourceType variable

Post by jduplessis »

blackhawk wrote:Why are you trying to set the datasource type? Perhaps a little more of the script may help to understand what you are trying to accomplish?

Switching the datasource type from cube to 'none' has some implications on the variables. It might be better to check the existence of a cube and then execute one process or another depending on that answer using the ExecuteProcess command.
Can't post too much code since it is not mine to post. But after further investigation is looks like there are evaluation stack overflows. It was dying on that line but I think that that line was not what was causing the error, just the point at which the stack overflows killed the process.
dan.kelleher
Community Contributor
Posts: 127
Joined: Wed Oct 14, 2009 7:46 am
OLAP Product: TM1
Version: 9.4
Excel Version: 11
Location: London

Re: TI DataSourceType variable

Post by dan.kelleher »

Have a look at the below:

http://www-01.ibm.com/support/knowledge ... 19?lang=en

You may want to change the datasourcetype if you want a single process to handle text and ODBC data sources for example, although I have never set it to 'NULL'.

Valid types include:

'CHARACTERDELIMITED', 'POSITIONDELIMITED', 'VIEW', 'SUBSET', ODBC' and 'OLEDBOLAP', 'SAPCHARACTERISTICTEXTS'

You need to use these in conjunction with the other local variables as stipulated in the Reference Guide.
lotsaram
MVP
Posts: 3652
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: TI DataSourceType variable

Post by lotsaram »

Despite what you've been told in this thread setting DatasourceType = 'NULL' is actually a pretty common strategy to do on the Prolog tab if for some reason a data source validation test should fail. Essentially it sets the process at runtime to ignore the Metadata and Data tabs and proceed directly to the Epilog tab at the conclusion of the Prolog. You can achieve the same with ProcessBreak but this creates some extra verbosity in the server message log and causes the process to exit with a minor error code, both of which you might want to avoid.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
jduplessis
Posts: 19
Joined: Tue Sep 16, 2014 11:51 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010
Location: Ottawa, Canada

Re: TI DataSourceType variable

Post by jduplessis »

lotsaram wrote:Despite what you've been told in this thread setting DatasourceType = 'NULL' is actually a pretty common strategy to do on the Prolog tab if for some reason a data source validation test should fail. Essentially it sets the process at runtime to ignore the Metadata and Data tabs and proceed directly to the Epilog tab at the conclusion of the Prolog. You can achieve the same with ProcessBreak but this creates some extra verbosity in the server message log and causes the process to exit with a minor error code, both of which you might want to avoid.
Thanks, I think you are right, that this is what the code intended.
ardi
Community Contributor
Posts: 148
Joined: Tue Apr 02, 2013 1:41 pm
OLAP Product: tm1, cognos bi
Version: from TM1 9.4 to PA 2.0.9.6
Excel Version: 2010
Location: Toronto, ON

Re: TI DataSourceType variable

Post by ardi »

I also use the DataSourceType = 'NULL' a lot. I have many TIs that load data from CSV files that are supposed to exist in a certain folder, and before i set the datasource, i check if the file exists or not. Also when using a cubeview as datasource, if any of the subsets of the view is empty, TM1 will throw an error. So instead i check the size of subsets and if any of them is zero then set DataSourceType = 'NULL'
Ardian Alikaj
Post Reply