Page 1 of 1

DatasourceNameonServer

Posted: Wed Jul 22, 2009 6:14 am
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

Re: DatasourceNameonServer

Posted: Wed Jul 22, 2009 6:19 am
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.)

Re: DatasourceNameonServer

Posted: Wed Jul 22, 2009 7:29 am
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

Re: DatasourceNameonServer

Posted: Wed Jul 22, 2009 8:13 am
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

Re: DatasourceNameonServer

Posted: Wed Jul 22, 2009 9:45 am
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.

Re: DatasourceNameonServer

Posted: Wed Jul 22, 2009 1:30 pm
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

Re: DatasourceNameonServer

Posted: Tue Aug 11, 2009 10:43 am
by Jessy
Great!

It really helps me a lot!

Thank you guys :)