microsoft / powerbi-azure-pipelines-extensions

MIT License
36 stars 14 forks source link

Adding Dataset Parameters Replacements as Action #16

Open JulianMar11 opened 2 years ago

JulianMar11 commented 2 years ago

Integrating an action to replace a specific dataset parameter value within thisextension would be great, since we could manage dataset source parameters such as the database connection detail centralized in DevOps libraries.

It is basically an integration of this extension: https://marketplace.visualstudio.com/items?itemName=AliMostafa.set-power-bi-dataset-parameters&ssr=false#overview

hski-bayer commented 1 year ago

Deployment rules are key feature of Power BI deployment pipelines.

Please add support for Deployment rules via Power BI automation tools, so that that can be defined and controlled from Azure Dev Ops pipelines.

hski-bayer commented 1 year ago

I think the corresponding REST API are

See API call to update parameters https://github.com/alim92/powerbi-vsts-extensions/blob/master/setpowerbidatasetparameters/setpowerbidatasetparameters/ps_modules/PowerBi/powerbi.psm1#L54

ParamsArray in a json format: Example: [{"name": "MaxId","newValue": "5678"},{"name": "StrParam","newValue": "Another Hello"}] according to https://github.com/alim92/powerbi-vsts-extensions/blob/master/setpowerbidatasetparameters/readme.md

To set a parameter the dataset ID needs to be provided. dataset IDs in a workspace can be retrieved using Get Datasets In Group

Also to know what parameters exist for a dataset you get this information using Get parameters in a Group

See also #25