Page 1 of 1

Can not open location in the cloud environment as a datasource.

Posted: Mon Jul 29, 2024 9:58 am
by gmunoz
Hi everyone.

First a little bit of context.

I am working for a company developing in Planning Analytics in cloud. We have a load process that transfers data from a data warehouse to a Cube. This process sometimes retrieves errors because the dimensions are not updated. Therefore, I want to send an email after the process to the data warehouse team so they can see these issues.

I am writing a process for this. The process needs to look for the last error log and then pass it as a parameter for a PowerShell script on the designated server that will send the email with the log attached. Because the error log names change with a difficult naming structure, I need to open the tm1server log, go to the last line, and scan for the error log name.

The problem is that I put the location where this log is placed as a datasource in the process, but I receive the error: "Error: Prolog procedure line (0): Unable to open data source 'S:\prod\LC\Logs\tm1server'". This is strange to me because we have admin credentials, and this is the same server where our Planning Analytics environment is placed.

If someone knows how to fix this, what could be failing, or another method to solve this issue, it would be greatly appreciated.

Thank you.

Re: Can not open location in the cloud environment as a datasource.

Posted: Mon Jul 29, 2024 10:14 am
by MarenC
Hi,

In IBM cloud you need to use the relative file path and not the S:, so something like ..\02 Logs\

Maren

Re: Can not open location in the cloud environment as a datasource.

Posted: Mon Jul 29, 2024 10:33 am
by gmunoz
MarenC wrote: Mon Jul 29, 2024 10:14 am Hi,

In IBM cloud you need to use the relative file path and not the S:, so something like ..\02 Logs\

Maren
Thank you very much!

So for the example on my post i should write as a location "..\Logs\tm1server" ?

Re: Can not open location in the cloud environment as a datasource.

Posted: Mon Jul 29, 2024 10:47 am
by gtonkin
You could also try use the Data source as Location instead of file and then supply S:\prod\LC\Logs\tm1server... as the Location.

Re: Can not open location in the cloud environment as a datasource.

Posted: Mon Jul 29, 2024 10:59 am
by gmunoz
gtonkin wrote: Mon Jul 29, 2024 10:47 am You could also try use the Data source as Location instead of file and then supply S:\prod\LC\Logs\tm1server... as the Location.
This is exactly what I am doing, data source is location and the location was specified as "S:\prod\LC\Logs\tm1server" i have tried with "..\LC\Logs\tm1server" too.

Re: Can not open location in the cloud environment as a datasource.

Posted: Mon Jul 29, 2024 11:04 am
by gtonkin
Have you tried with \\data\S\prod... instead of S:\prod...

Edit: But like Maren suggests, I think most of us use relative paths as it generally makes more sense, especially with multiple databases that always need to reference the "same" model folders.

Re: Can not open location in the cloud environment as a datasource.

Posted: Mon Jul 29, 2024 11:05 am
by MarenC
Hi,
So for the example on my post i should write as a location "..\Logs\tm1server" ?
Well obviously not as what is tm1server supposed to mean? You need to specify a specifc file I assume?

Something like ..\Logs\tm1server.log or as George advises, but with .log included.

Maren

Re: Can not open location in the cloud environment as a datasource.

Posted: Mon Jul 29, 2024 11:09 am
by gmunoz
MarenC wrote: Mon Jul 29, 2024 11:05 am Hi,
So for the example on my post i should write as a location "..\Logs\tm1server" ?
Well obviously not as what is tm1server supposed to mean? You need to specify a specifc file I assume?

Something like ..\Logs\tm1server.log or as George advises, but with .log included.

Maren
Yes, I have tried with tm1server.txt and tm1server.log too with the same error message, at this point I'm very desperate.

Re: Can not open location in the cloud environment as a datasource.

Posted: Mon Jul 29, 2024 11:18 am
by gtonkin
What may be happening here base on what you are trying to do and the last log is that in Epilog, the error log is still open/in use and is named something like TM1ProcessError....log$

In some of my processes where I need to email this to someone, the first part of my powershell script waits 3 seconds to allow the TI process to complete, rename the log and release any locks.

Re: Can not open location in the cloud environment as a datasource.

Posted: Mon Jul 29, 2024 11:26 am
by MarenC
Hi,

following on from what George said, if it isn't a locking issue on the file then the only thing I can think of is that your log folder is called something different to what you imagine it is, i.e. it isn't called Logs.

If these suggestions do not work then screen image of the process data source or the prolog if the datasource name is changed. And screen image of the folder location of the log file would be most helpful.

Maren

Re: Can not open location in the cloud environment as a datasource.

Posted: Mon Jul 29, 2024 11:28 am
by gmunoz
gtonkin wrote: Mon Jul 29, 2024 11:18 am What may be happening here base on what you are trying to do and the last log is that in Epilog, the error log is still open/in use and is named something like TM1ProcessError....log$

In some of my processes where I need to email this to someone, the first part of my powershell script waits 3 seconds to allow the TI process to complete, rename the log and release any locks.
This should not be the case because, at this moment, this is a separate process, and the process is not even getting to the prologue where we need to read the log and look for the last line. I cannot get to the preview of the datasource either.

Re: Can not open location in the cloud environment as a datasource.

Posted: Mon Jul 29, 2024 10:09 pm
by David Usherwood
I've been working with IBM SaaS for some time. Looking at the structures you get when you create a new instance. I'm 99% sure that the only path that will work for accessing the logs folder is '..\logs\<filename>'.

Formulations like \\data\s\logs\<filename> are for 'Data Source Name' in the rich client, which is (sadly, for someone who remembers the excitement when TI arrived in 7.0, replacing Process Worksheets), about to go to the IBM graveyard of useful tools which are not worth maintaining or supporting. It is possible that it might work, but then you would be accessing a file via a network share on the server on which TM1 is running - no point and probably slower.

If you are a purist then you could use GetProcessErrorFileDirectory to pick up the logs folder, but you'll finish up in the same place.

Re: Can not open location in the cloud environment as a datasource.

Posted: Tue Jul 30, 2024 12:41 pm
by Wim Gielis
I also use the Location type and then the . and .. relative paths.

What should work too (given remarks of David) for Data source name for Client is:

- S:\prod\TM1MODELNAME\Inputfiles\data.csv
- \\data\s\prod\TM1MODELNAME\Inputfiles\data.csv
- \\10.175.10.91\s\prod\TM1MODELNAME\Inputfiles\data.csv

For Data source name for Server:

- S:\prod\TM1MODELNAME\Inputfiles\data.csv
- NOT.......... \\data\s\prod\TM1MODELNAME\Inputfiles\data.csv
- NOT.......... \\10.175.10.91\s\prod\TM1MODELNAME\Inputfiles\data.csv

Adjust as per your situation. For me relative paths are number 1 candidates.
Even better, store the Data source name for Server (or a main folder above) in a system configuration cube and retrieve it at runtime.