cancel
Showing results for 
Search instead for 
Did you mean: 

Changing data source with script in design studio?

Former Member
0 Kudos

Hi,

I'm trying to change a data source in design studio 1.4.  The data source is a BO universe, by first assigning it manual and then reloading, however Design Studio does not recognize the Data Source cuid in the script panel.

var DS1_DataSourceName = DS1.getInfo().queryTechnicalName;

DS2.assignDataSource("cuid:AYQv_XY3NA9Mknq4NTcZFzk", DataSourceType.QUERY, DS1_DataSourceName);

Error is following:

Value "cuid:AYQv_XY3NA9Mknq4NTcZFzk" is not a valid back end connection.

I have full administrator rights.

Any solution pls?

Regards,

Keraban

Accepted Solutions (1)

Accepted Solutions (1)

MustafaBensan
Active Contributor
0 Kudos

Hi Keraban,

I don't have a BI Platform backend setup at the moment but will try to help.  Can you provide a screenshot of your Backend Connections window in the Design Studio Preferences?

Regards,

Mustafa.

Former Member
0 Kudos

hi,

MustafaBensan
Active Contributor
0 Kudos

Hi Keraban,

This is a bit of a long shot but if you're testing locally, can you try replacing the CUID with the exact Name of the universe it corresponds to as listed under Relational Universe in your screenshot?  I had a similar issue with a BW connection where I had to specify the descriptive name instead of the technical name.  So, your script would look something like this:

DS2.assignDataSource("UNI_BOLGE_DASHBOARDU.unx", DataSourceType.QUERY, DS1_DataSourceName);

Regards,

Mustafa.

TammyPowlas
Active Contributor
0 Kudos

Mustafa - I am not sure that is going to work; when I use the "wizard" for the backend connections on the BI Platform only my OLAP connections appear; I wonder if this method is only supported for OLAP connections and not relational datasources...that is how it appears to me at this point.  I haven't looked at the SAP Help yet.

TammyPowlas
Active Contributor
0 Kudos

Wizard help says "This method call is ignored when assigning data sources from DSL Universes."

Do you think it means it won't work for relational universes for Keraban?

Former Member
0 Kudos

Hi Mustafa,

Unfortunately it is not working.

Same error occured: "Value "UNI_BOLGE_DASHBOARDU.unx" is not a valid back end connection"

MustafaBensan
Active Contributor
0 Kudos

Hi Tammy,

If that's the case then yes, it probably isn't supported.  I didn't think to check the wizard help.  For example, the reloadData() method showed the same message in DS 1.4 because it was not supported for universes.  Interestingly, in DS 1.5 I had noticed this message no longer appears in the wizard so perhaps universe support has been provided for reloadData() but based on your check it seems like it may not be supported for assignDataSource().

Thanks,

Mustafa.

MustafaBensan
Active Contributor
0 Kudos

Hi Keraban,

Based on Tammy's comment above, it looks like assignDataSource() is unfortunately not supported for universe connections.  I'll investigate further and let you know if I find anything.

Mustafa.

Former Member
0 Kudos

Thank you Mustafa and Tammy.

Regards,

Keraban

MustafaBensan
Active Contributor
0 Kudos

Hi Keraban,

I can confirm Tammy's observation:

If you can elaborate on your requirement perhaps we can find an alternative solution to achieve the desired result?  For example, using the setDataSource() method to change the data source assigned to a component.

Regards,

Mustafa.

Former Member
0 Kudos

Hi,

setDataSource() method have solved my requirements. Thank you.

Regards,

Keraban

Answers (0)