File Datasource in PAW

Post Reply
dmillerksu
Posts: 10
Joined: Sun Apr 17, 2011 2:01 pm
OLAP Product: Planning Analytics
Version: 2.0.7 PAW v46
Excel Version: 19

File Datasource in PAW

Post by dmillerksu »

This is the first time I created a process in PAW using a file as a datasource. I've created plenty using Architect, and have been using PAW for a few months now. I selected a file, and it saved to the model_upload folder in the Data directory. I finished writing the process and everything went as expected. But as I've done with many other processes using Architect, I added a pFile parameter and used that to change the DataSourceNameForServer variable so I can reference a different file. I populated the parameter with the full path and name of a file (as I'm used to doing), but when I ran the process I received an error saying that it couldn't find the data source file. The error indicated the DataSourceNameForServer concatenated the data files directory path with my parameter value. Does PAW expect that files loaded to the server will only come from within the data directory? Is there a way to change that behavior without going back to architect? I don't see any new variable in the IBM documentation, or any reference to this change in behavior. I exported the DataSourceNameForServer variable to file, this is what I see...
model_upload\upload_file.csv

I see this thread, but it doesn't address the datasource issue per se...
https://www.tm1forum.com/viewtopic.php?f=3&t=14192

But I definitely don't think it's ideal for people to drop the CSV's in the data directory itself. These files could get rather large. And obviously I don't want people accessing the data directory, and would prefer not making placing CSV files in the data directory a regular admin task. Any help would be greatly appreciated.
tomok
MVP
Posts: 2832
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: File Datasource in PAW

Post by tomok »

dmillerksu wrote: Fri Dec 06, 2019 5:36 pm This is the first time I created a process in PAW using a file as a datasource. I've created plenty using Architect, and have been using PAW for a few months now. I selected a file, and it saved to the model_upload folder in the Data directory. I finished writing the process and everything went as expected. But as I've done with many other processes using Architect, I added a pFile parameter and used that to change the DataSourceNameForServer variable so I can reference a different file. I populated the parameter with the full path and name of a file (as I'm used to doing)
Show us the code. That will tell us a lot. FYI, if you do not specify a full path, or don't specify a path at all, when the process is run TM1 looks for the file in the default directory that the TM1 service is set to. Most of the time that is the data directory. it sounds to me like you didn't specify a full path with drive letter OR UNC. It would need to be something like c:\MyPath\MyFile or \\server\MyShare\MyPath\MyFile. Anything less than that then it's just going to fail by concatenating it to the data directory path.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
dmillerksu
Posts: 10
Joined: Sun Apr 17, 2011 2:01 pm
OLAP Product: Planning Analytics
Version: 2.0.7 PAW v46
Excel Version: 19

Re: File Datasource in PAW

Post by dmillerksu »

Ugh. Nevermind. This was actually an issue with a hidden character that I pasted into the parameter. It works fine now.
Wim Gielis
MVP
Posts: 3120
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: File Datasource in PAW

Post by Wim Gielis »

tomok wrote: Fri Dec 06, 2019 7:06 pmFYI, if you do not specify a full path, or don't specify a path at all, when the process is run TM1 looks for the file in the default directory that the TM1 service is set to. Most of the time that is the data directory. it sounds to me like you didn't specify a full path with drive letter OR UNC. It would need to be something like c:\MyPath\MyFile or \\server\MyShare\MyPath\MyFile. Anything less than that then it's just going to fail by concatenating it to the data directory path.
Paths relative to the TM1 data directory (by using . and/or ..) are possible too.
Best regards,

Wim Gielis

IBM Champion 2024
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
Post Reply