cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

datasets.setAllConnections not working in Node SDK and CLI Tool (BUG?)

I am not able to provide a correct connections string to this function. Neither with the PowerBi CLI Tool nor with the node SDK.

 

 

[ powerbi ] Error updating connection string
[ powerbi ] parameters[valueElement] must be of type object.

 

my connection string looks like this

 

-s connectionString: data source=MyAzureDB.database.windows.net;initial catalog=Sample2;persist securityinfo=True;encrypt=True;trustservercertificate=False

 

I not sure if this is a bug.

 

Does Any succeded in doing this ?

 

michael

 

 

9 REPLIES 9
Microsoft
Microsoft

Thanks for reporting this issue.  Can you please log an issue with your repro steps in our Github site @ https://github.com/Microsoft/PowerBI-Cli

 

ok. I will. I wonder that this basic Function is not working.

michael

 

Thanks for fixing the issue. I now can upload the connection string.

Below my Request

 

WebResource {
  rawResponse: false,
  queryString: {},
  method: 'POST',
  headers: 
   { 'Content-Type': 'application/json; charset=utf-8',
     authorization: 'AppKey cAY0b0dCSSbg.......NzKAHhr7sukaxkZ9BfOL94gopjilKcdpLTKz0v2qMlw==' },
  url: 'https://api.powerbi.com/v1.0/collections/powerbistart/workspaces/112efff......60-05da61ded3ba/datasets/a1baf74f-8831-....e1ea91fbfe8b/Default.SetAllConnections',
  body: '{"connectionString":"data source=ServerName.database.windows.net;initial catalog=MyDB;persist security info=True;encrypt=True;trustservercertificate=False"}' }
Jsonstring [object Object]

perhaps i missunderstood "initial catalog" ? I insert the db name there.

It seams not to work. I double checked everysting. The report is not updated. Yes i use directQuery.

 

Did anybody got this to work ?

 

P.S: If i reload the ifame everything is uptodated. Also if i check when the report was last refreshed it shows me the date of i triggered setAllConnections(). But the Data is still the same.

michael

 

Can you explain the new issue?  You mentioned everything is up-to-date, but the data is the same...?  Has the underlying data changed in your datasource?

Yes the data changed. A new row is added every 30 sec. I would expect all visuals get updated when I trigger updateallconnections. They are not.
But if you go into zoom mode of a specific visual you get the time when the dataset was updated. It is the time I triggered updateallconnections. But still all visuals rely on the old data initial data i loaded powerbi embedded.
Does this help ?

 

The report will not automatically update on the client side when new data becomes available.  We are working on enhancements to the JavaScript SDK that will make this easier.  Also - you should not have to call `setAllConnections` again.  Assumming you setup your dataset as a direct query dataset then the data should be pulled on each report load as well as each intersection reqeust for new data (aka applying a filter).

mmh. Yes i am using directQuery. I don't request new data every time (aka filter). I use a slicer to filter on DateTime for example. 

In my perfect world this would also update the data set. Any tip for a workaround ?

 

You mentioned 'on enhancements to the JavaScript SDK'. I guess you refer to the dev branch. I can't get this to work. 

 

see

http://community.powerbi.com/t5/Developer/PowerBI-Client-2-0-beta-testing/m-p/51504#U51504

 

Thank you for your replies !

 

michael

you are right each time i load a report, the data is refreshed.

Loading the whole iframe takes to much time und is not a solution for us.

 

Could you please explain what the new sdk makes different in terms of a refresh ? 

We really need a way to refresh the visuals after some time automatically. 

 

michael

 

This support is coming as part of the JavaScript SDK roadmap.  Keep an eye out on our blog and developer portals for more information.

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.