Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Letโs celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
After removing one table from the Semantic Model, the Azure Pipeline start failing to deploy the semantic model.
I am using Approach 4 "Deploy content by using only Azure Pipelines" from Microsoft Documentation - Power BI implementation planning: Deploy content
The script I've been using was got from Analysis-Services/pbidevmode/fabricps-pbip at master ยท microsoft/Analysis-Services from @RuiRomanoMS
Thatยดs the PowerShell script responsible to deploy the semantic model and report. ( I just added parameters so that I can get as Enviroment Variables in the Azure Pipeline )
Solved! Go to Solution.
Hi @dpiresm92,
Thank you for reaching out to the Microsoft fabric community forum. Thank you @Deku, for your inputs on this issue.
โThe error message you are encounteringโ"LRO API Error: 'Alm_InvalidRequest_PurgeRequired'"โindicates that the deployment process is failing because the semantic model's schema has changed. Specifically, a table has been removed, and the existing dataset in the target environment contains outdated data that does not match the updated schema.
If you are not currently incorporating scripting into your deployment pipeline, you can: Access the Power BI Service, navigate to the target workspace, and manually delete the dataset (this will remove the old schema and associated data). Then, redeploy the semantic model using your existing pipeline.
Automate the Purge Step (Recommended for CI/CD pipelines): To ensure a fully automated pipeline, add a purge step using the XMLA endpoint before deployment. This can be achieved using PowerShell, Azure CLI, or tools like Tabular Editor. The purge clears the dataset content to accept the updated schema. For instance, PowerShell with the Invoke-ASCmd command is a common method used in CI/CD workflows.
For additional context, Microsoft has published guidance on common deployment errors, including the Alm_InvalidRequest_PurgeRequired issue, in their CI/CD troubleshooting documentation:
Troubleshoot the Fabric lifecycle management tools. - Microsoft Fabric | Microsoft Learn
Also please go through the solved link for more information:
Solved: Re: Deployment Pipeline loses bindings and create... - Microsoft Fabric Community
If this post helps, then please give us โKudosโ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
I consider this to be a bug, I'm discussing internally how to handle it. It may be caused by a semantic model change that causes data loss in the target semantic model such as change of a column data type.
In the meantime, a workaround is to use the FABCLI and run a refresh clear command on the target semantic model before deploying.
- Install FAB CLI - fabric-cli | โก Microsoft Fabric CLI
- Run the following command:
api -X post /groups/<workspace id>/datasets/<semantic model id>/refreshes
-i {"type": "ClearValues"} -A powerbi
- deplloy the semantic model
As mentioned by others you can also use SSMS to run a refresh clear command.
Hi @dpiresm92,
Thank you for reaching out to the Microsoft fabric community forum. Thank you @Deku, for your inputs on this issue.
โThe error message you are encounteringโ"LRO API Error: 'Alm_InvalidRequest_PurgeRequired'"โindicates that the deployment process is failing because the semantic model's schema has changed. Specifically, a table has been removed, and the existing dataset in the target environment contains outdated data that does not match the updated schema.
If you are not currently incorporating scripting into your deployment pipeline, you can: Access the Power BI Service, navigate to the target workspace, and manually delete the dataset (this will remove the old schema and associated data). Then, redeploy the semantic model using your existing pipeline.
Automate the Purge Step (Recommended for CI/CD pipelines): To ensure a fully automated pipeline, add a purge step using the XMLA endpoint before deployment. This can be achieved using PowerShell, Azure CLI, or tools like Tabular Editor. The purge clears the dataset content to accept the updated schema. For instance, PowerShell with the Invoke-ASCmd command is a common method used in CI/CD workflows.
For additional context, Microsoft has published guidance on common deployment errors, including the Alm_InvalidRequest_PurgeRequired issue, in their CI/CD troubleshooting documentation:
Troubleshoot the Fabric lifecycle management tools. - Microsoft Fabric | Microsoft Learn
Also please go through the solved link for more information:
Solved: Re: Deployment Pipeline loses bindings and create... - Microsoft Fabric Community
If this post helps, then please give us โKudosโ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Interesting not seen that before. It sounds like it wants you to delete all the data. You can do this with XMLA endpoint by running a clear values on the table in question or the model. Can you SSMS or enchanted refresh API.
You could see if Fabric CICD is more robust