Hi,
I have created a process using a cube view as the source and have dynamically built the view on the prolog and then in the same process I have updated the meta and data tabs.
So in the prolog I have the following to make this work:
DatasourceType = 'VIEW';
DatasourceNameForServer = vCube;
DatasourcecubeView = vName;
In other words I can put everything in one process.
However when I come to write a process using a text file it doesn't allow me to do this, so if I create the text file in the prolog and I put the following
DatasourceType = 'CHARACTERDELIMITED';
DatasourceNameForServer = vFile;
DatasourceNameForClient= vFile;
I can't update on the meta and data tabs because I get an error saying process aborted and it says unable to open data source. If I then run the process again it works because the file then exists.
Is there any way I can get this to work so I don't have to create multiple processes?
Maren
Difference between TI Text and Cube View
-
- MVP
- Posts: 3234
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Difference between TI Text and Cube View
You should just create a file manually with the same columns and a few lines. Like that you will have Variables and everything will work fine. The prolog tab can still set the data source in a dynamic way.
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Regular Participant
- Posts: 436
- Joined: Sat Jun 08, 2019 9:55 am
- OLAP Product: Planning Analytics
- Version: Planning Analytics 2.0
- Excel Version: Excel 2016
Re: Difference between TI Text and Cube View
Hi Wim,
I know I can create the file manually and it will work. The point is that I want to create the file in the prolog (using powershell) and then use this file created in the prolog in the meta and data tabs. I can do this when the data source is a cube view but not when it is a text file.
Maren
I know I can create the file manually and it will work. The point is that I want to create the file in the prolog (using powershell) and then use this file created in the prolog in the meta and data tabs. I can do this when the data source is a cube view but not when it is a text file.
Maren
-
- MVP
- Posts: 3234
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Difference between TI Text and Cube View
Do you have proper variables ?
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Regular Participant
- Posts: 436
- Joined: Sat Jun 08, 2019 9:55 am
- OLAP Product: Planning Analytics
- Version: Planning Analytics 2.0
- Excel Version: Excel 2016
Re: Difference between TI Text and Cube View
Hi Wim,
Yes I defined all the variables using a file I had already created.
This file was then deleted and the file is created in the prolog via powershell.
If I run the process it creates the file but then aborts saying it can't open the data source. If I immediately run the process again it works fine as it can now find the data source.
Maren
Yes I defined all the variables using a file I had already created.
This file was then deleted and the file is created in the prolog via powershell.
If I run the process it creates the file but then aborts saying it can't open the data source. If I immediately run the process again it works fine as it can now find the data source.
Maren
-
- MVP
- Posts: 3703
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: Difference between TI Text and Cube View
There should be no issue with creating the file in the prolog which you want to use as a datasource. TI does not try to access the datasource until the prolog is finished.
The issue you might have is that there is still a lock on the file.
- is the command line properly terminated?
- have you tried putting in a wait to allow PS to finish?
The issue you might have is that there is still a lock on the file.
- is the command line properly terminated?
- have you tried putting in a wait to allow PS to finish?
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
-
- Regular Participant
- Posts: 436
- Joined: Sat Jun 08, 2019 9:55 am
- OLAP Product: Planning Analytics
- Version: Planning Analytics 2.0
- Excel Version: Excel 2016
Re: Difference between TI Text and Cube View
That was the problem. I had ExecuteCommand(vCmd, 0), I changed to ExecuteCommand(vCmd, 1) and it worked okhave you tried putting in a wait to allow PS to finish?
Thank you very much
Maren
- PavoGa
- MVP
- Posts: 622
- Joined: Thu Apr 18, 2013 6:59 pm
- OLAP Product: TM1
- Version: 10.2.2 FP7, PA2.0.9.1
- Excel Version: 2013 PAW
- Location: Charleston, Tennessee
Re: Difference between TI Text and Cube View
I do not know if this is what lotsaram was referring to, but an alternative is to use SLEEP(n) after the ExecuteCommand where n = milliseconds as another way of giving PS time to complete.
With ExecuteCommand, if something goes wrong in the called script and it gets hung up, your TI will sit there patiently waiting for it to complete when the second argument is set to "1".
With ExecuteCommand, if something goes wrong in the called script and it gets hung up, your TI will sit there patiently waiting for it to complete when the second argument is set to "1".
Ty
Cleveland, TN
Cleveland, TN
-
- Regular Participant
- Posts: 436
- Joined: Sat Jun 08, 2019 9:55 am
- OLAP Product: Planning Analytics
- Version: Planning Analytics 2.0
- Excel Version: Excel 2016
Re: Difference between TI Text and Cube View
I updated to use sleep instead, thanks.
Maren
Maren