DatasourceNameonServer

Post Reply
shorsted
Posts: 33
Joined: Mon Dec 15, 2008 4:37 pm

DatasourceNameonServer

Post by shorsted »

Hi

I'm trying trying to find out whether or not I can feed a parameter into a TI process which will channge the cube view that I am using as a datasource

I know that I can do this if my datasource is an ASCII file by adding DatasourceNameForServer='\\servername\ExampleFileName.txt' to the prolog tab of a process

I have a process that I want to run and in some cases I want it to use a cube view from one cube and in other cases the cube view from another cube. Both cubes have the same structure and I am creating the view within the prolog tab also

This process runs using parameters from a cube which will dictate which datasource eg:
Parameter sSource = 'Cube1';

I've built the process using a view that already exists on Cube1 and then created a section within the prolog to create this view and a section in the epilog which then deletes it. This all works fine as long as I keep the source as Cube1

I've now added into the prolog:
DatasourceNameForServer = sSource | '->z AOL';
where sSource is now Cube2

I get the following error: (z AOL is the viewname which I am using for both cubes)
Error: Prolog procedure line (0): Unable to open data source "sSource->z AOL"

This error implies to me that it is actually changing the datasource at some point but is then failing to read the view. I feel like I'm half way there but can't get any further :?
The same error occurs if I feed the parameter sSource with Cube1 as well

Has anyone got any ideas? :idea:

Many thanks
Sarah Horsted
Alan Kirk
Site Admin
Posts: 6645
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: DatasourceNameonServer

Post by Alan Kirk »

shorsted wrote:Hi

I'm trying trying to find out whether or not I can feed a parameter into a TI process which will channge the cube view that I am using as a datasource
Try using DatasourceCubeview as well as DatasourceNameForServer. I believe that the latter changes the cube name, and the former the View name. (I haven't tested it, but that's my understanding.)
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Wim Gielis
MVP
Posts: 3223
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: DatasourceNameonServer

Post by Wim Gielis »

Hi Sarah

Try this in the Prolog tab:

Code: Select all

DataSourceType='VIEW';
DataSourceNameForServer='the name of the cube';
DatasourceCubeview='the name of the view';
HTH,

Wim
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
User avatar
Steve Rowe
Site Admin
Posts: 2455
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: DatasourceNameonServer

Post by Steve Rowe »

This often happens because the view is not correctly defined. Typically becuase one of the subsets is empty. Try opening the view in the server explorer to see what is wrong.
HTH
Technical Director
www.infocat.co.uk
Alan Kirk
Site Admin
Posts: 6645
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: DatasourceNameonServer

Post by Alan Kirk »

Alan Kirk wrote:
shorsted wrote:Hi

I'm trying trying to find out whether or not I can feed a parameter into a TI process which will channge the cube view that I am using as a datasource
Try using DatasourceCubeview as well as DatasourceNameForServer. I believe that the latter changes the cube name, and the former the View name. (I haven't tested it, but that's my understanding.)
OK now I've tested it, and confirmed it. (9.4.)

You don't need to use the DatasourceType variable unless the process was previously defined as having another type, but there's no harm doing so.

However the sSource | '->z AOL'; syntax that you were using definitely won't fly; that's just for display in the dialog.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
shorsted
Posts: 33
Joined: Mon Dec 15, 2008 4:37 pm

Re: DatasourceNameonServer

Post by shorsted »

:D :D :D :D

It works!

I've amended my original:
DataSourceNameForServer = sSource | '->z AOL';

to:
DataSourceNameForServer = sSource;
DatasourceCubeview = 'z AOL';

and it works like a dream! Thanks alot guys, this will save me lots of duplication of processes!

Kind regards
Sarah Horsted
Jessy
Posts: 38
Joined: Wed Mar 25, 2009 7:35 am
OLAP Product: TM1
Version: 9.4.1
Excel Version: 2003

Re: DatasourceNameonServer

Post by Jessy »

Great!

It really helps me a lot!

Thank you guys :)
Post Reply