Forum Discussion
Github integration and Semantic Model Parameters
- 1 year ago
Hi HankoSwart - One effective method is to separate configuration files for each environment (Development, Test, Prod) within your repository. For example, you could maintain environment-specific parameter files (e.g., parameters.dev.json, parameters.test.json, parameters.prod.json) that contain only the required parameter settings for each workspace.
Automate Parameter Injection: Use GitHub Actions or a deployment script that reads the appropriate parameter file based on the target environment and injects the parameters directly into the deployment process. By injecting these parameters only at deployment, you can avoid altering the expressions.tmdl in the source branch, reducing the risk of merge conflicts.OR
Power BI REST API
If possible, consider temporarily assigning dataset ownership to the service principal for deployment purposes. You can automate this using PowerShell or the REST API, where the service principal takes ownership, updates parameters, and then reassigns ownership back to the original user.
Update Parameters on Deployment: Once the service principal has ownership, it can update dataset parameters through the REST API for each environment after deployment. This would allow you to handle parameter changes without directly modifying the source files in GitHub.
Hi HankoSwart - One effective method is to separate configuration files for each environment (Development, Test, Prod) within your repository. For example, you could maintain environment-specific parameter files (e.g., parameters.dev.json, parameters.test.json, parameters.prod.json) that contain only the required parameter settings for each workspace.
Automate Parameter Injection: Use GitHub Actions or a deployment script that reads the appropriate parameter file based on the target environment and injects the parameters directly into the deployment process. By injecting these parameters only at deployment, you can avoid altering the expressions.tmdl in the source branch, reducing the risk of merge conflicts.
OR
Power BI REST API
If possible, consider temporarily assigning dataset ownership to the service principal for deployment purposes. You can automate this using PowerShell or the REST API, where the service principal takes ownership, updates parameters, and then reassigns ownership back to the original user.
Update Parameters on Deployment: Once the service principal has ownership, it can update dataset parameters through the REST API for each environment after deployment. This would allow you to handle parameter changes without directly modifying the source files in GitHub.