martin_spaldin3
8 years agoNew Member
Status:
Needs Votes
Change parameter values within direct query sources
Currently you can only change parameter values online within imported data sources, this would be useful to have on direct query and live connection data sources also as the ability to move through e...
shkarnam
6 years agoNew Member
As a workaround, we can use the Power BI Rest APIs to update the data source. In my case, I had a bunch of tables using the parameterized Azure SQL DB data source. Source = Sql.Database(AzSqlSrvName, AzSqlDbName) I had to convert one of the large table to use Direct Query mode. When I published the power bi desktop file to PBI Service and updated the parameters to point to the production SQL db, there were two data source connections established in the Power BI Service. Certainly, the connection string and the MQuery for the Direct Query mode table was cached. I used the Power BI Rest API and Powershell to update the data source for the Direct Query connection. Here are the steps taken: 1. Get DataSources for a given dataset using https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/getdatasources#code-try-0 The output returned was: { "@odata.context": "http://wabi-us-east-a-primary-redirect.analysis.windows.net/v1.0/myorg/$metadata#datasources", "value": [ { "datasourceType": "Sql", "connectionDetails": { "server": "myazureprod.database.windows.net", "database": "myPROD_db" }, "datasourceId": "44abc44a-4ab4-4cd4-444a-4acb4abc4444", "gatewayId": "11abc11a-1ab1-1cd1-111a-1acb1abc1111" }, { "datasourceType": "Sql", "connectionDetails": { "server": "myazureqasql.database.windows.net", "database": "myQA_db" }, "datasourceId": "00abc000-0000-000a-b000-c000aa00ee0", "gatewayId": "11abc11a-1ab1-1cd1-111a-1acb1abc1111" } ] } 2. Then iterate thru the list of Data Sources returned and determine the "datasourceId" that has a database name “myQA_db” 3. Then call Update Datasources API by passing the “datasourceId” and the new database name to “database” under “connectionDetails” node in the JSON request body. https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/updatedatasources#code-try-0 Here is the JSON request body: { "updateDetails": [
Recent ideas
Restore "no-reply" option for Power BI Subscriptions
Please add a setting in the Power BI Subscription pane to choose the sender identity. With the recent update the platform forces emails to route through the subscription owner's personal Exchange On...LenaFid52 minutes agoRegular VisitorNew285Views49likes11CommentsEnforcing OneLake Security on external semantic model API calls without adding security risks
Problem External applications cannot query Fabric semantic models on a user’s behalf - with OneLake RLS security rules enforced - unless the Fabric API is exposed to any and every client an authoriz...sean_cochran3 hours agoResolver INew20Views0likes0CommentsAllow ownership transfer (“Take over”) for Activator items
Activator rules run under the identity of the item’s creator. When that person leaves the organization and their account is disabled, all rules stop working silently. Unlike other Fabric items, there...ndelcastillo3 hours agoRegular VisitorNew27Views1like0Comments