简体   繁体   中英

Changing Power BI parameters with python

We have a default Power BI file (template), in which we perform a query to obtain the database through a parameter with the name of the database, for example: “database_client_X”. But we have several clients, each client with its own Power BI file and its own database.

Whenever we add a new client, we automatically generate a folder with the name of that client, copy the default file, throw it in that folder and rename the file to the name of the client. Thus, we would have, for example, the folder “Client_A”, with the file “Client_A”.

The problem is that the Power BI file of this client A is a renamed copy of the default file, and that is why its parameter with the database name is defined as “database_client_X”, the objective then is that in some automated way we can change this parameter to “database_client_A” and update the file.

I couldn't find a method to perform this automation, currently we have to open the file, edit the parameter manually and wait for the file to update. A simple solution would be something like defining this parameter in python itself and some command/function to update the base, but I can't find libraries or documentation on how to perform these processes within a Python code.

There's no API to modify.PBIX files. There is an API to modify the parameters after the.PBIX file is published to the Power BI service.

Datasets - Update Parameters In Group

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM