Skip to Content
0

setVariable/setfilter spend too much time in DS

Jul 05, 2017 at 03:43 AM

111

avatar image
Former Member

Hello everyone.

I'm use SAP BusinessObjects design studio 16.5 to develop report,and I'm use http OLAP to connect HANA. When I filter the datasource,I just use DS.setFilter or APPLICATION.setVariable,I hava 5 different datasource,and all of them have a variable(

Z-site),and I have set them in different datasource group.But when I use setFilter to filter datasource,which average filter cost 3.4s,when I change to APPLICATION.setVariable("Z-SITE","2001"),it spends 20 seconds,and most time spend there.Application.setVariable() shouldn't run all variabes in datasource that the variable name is same?

Waiting for your help.

Thanks.

Jing

table.png (32.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Mustafa Bensan Jul 05, 2017 at 04:00 AM
0

Hi Jing,

Some points to note:

1) In general, setFilter() always performs better than setVariable();

2) If you are taking advantage of the parallel processing groups, then since prompts are not merged, I would expect all common variables to be run in separate variable containers, perhaps explaining your performance issue;

3) The following blog posts may help you optimise your data loads based on processing groups:

https://blogs.sap.com/2015/09/28/parallel-processing-and-scripting/

https://archive.sap.com/documents/docs/DOC-63888

https://archive.sap.com/documents/docs/DOC-64462

Regards,

Mustafa.

Show 5 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Mustafa.

Thans for your reply.

I'm use the different query as 4 data sources, and both of them have the same variables in query.And I have divided them into 4 groups.The merged also have setting.SetVariable shouldn't better than filter? which isn't filter data on HANA before Design Studio load datasource?

Thanks.

Jing

prompts.png (10.3 kB)
0

Hi Jing,

I suggest you try the setFilter() approach without variables and compare the results. You can execute the setFilter() immediately after the loadDataSource().

Regards,

Mustafa.

0
Former Member
Mustafa Bensan

Hi Mustafa.

I've solved it.I just set all datasource to load in javascript=true,and application.setvariable,and then application.loaddatasource([array]).Which just 1.7-1.9s.And I still don't know why.

Thanks.

Jing

0

Hi Jing,

Thanks for the confirmation. I had assumed you had already set the Load in Script property to true. That is very interesting that you were able to apply setVariableValue() before APPLICATION.loadDataSources(). Normally, if the data source has not been initialised first, setVariableValue() returns an error. I just tried it and in my case there was no error this time but the setVariable() did not get applied. In which event did you apply your script?

Regards,

Mustafa.

0
Former Member
Mustafa Bensan

Hi Mustafa.

Follow is my code.

APPLICATION.setVariableValue("Z_SITE", "2001");
APPLICATION.loadDataSources([DS_2,JR,JRYD,YD,XC]);

Regards.

Jing

0