DataSourceType = ‘VIEW’

Product:

Planning Analytics 2.1.19
Microsoft Windows 2022 server

Issue:

How dynamically set the data source to a tm1 view?

Solution:

In prolog build up the subset and view, and then add

#--- set the view to use
DataSourceType = 'VIEW' ;
DatasourceNameForServer = Cube ;
DatasourceNameForClient = Cube  ;
DatasourceCubeview = ViewName ;

# Change to get semicolon in the text file
# DatasourceASCIIQuoteCharacter='';
# DatasourceASCIIDelimiter = ';';

# Change to get comma in the text file
DatasourceASCIIDelimiter = ',';
DatasourceASCIIDecimalSeparator = '.';
DatasourceASCIIQuoteCharacter = '"';

More Information:

https://www.ibm.com/docs/en/planning-analytics/2.0.0?topic=tlv-datasourcetype 

https://cubewise.com/functions-library/tm1-function-for-ti-datasourcetype/

https://exploringtm1.com/datasourcecubeview-syntax-use-example/

https://vrgultom.wordpress.com/2013/08/22/multiple-tm1-data-source-in-one-process/ 

https://www.ibm.com/docs/en/planning-analytics/2.0.0?topic=variables-turbointegrator-local