Forum Discussion
DmsImportDatabaseException - Invalid object that exists in both workspaces - Deployment Pipeline
Hello, I was trying to use the fabric Deployment Pipeline to move Warehouse between two workspaces (DEV and TEST) and got a strange error.
The View_2 in the error message queries a second table/view that queries View_abc. But, all of these exist in the warehouse item in each worskspace. The items or other Views i was trying to deploy are not related to this one.
"Import failure: DmsImportDatabaseException. Error occured during import database for the Datawarehouse '9xxxxxxxxxxx. File: audit/Views/View_2.sql, Error: Invalid object name 'audit.View_abc"
I have no idea what might be causing this, anyone with same issue that could help please? Or what can I do to find the root cause of this
Hi ritz ,
Thank you for reaching out to the Microsoft Community Forum.
Please try below things to fix the issue.
1. Please check dependency order, verify that:
View_abc --> is created before View_2. All referenced objects exist under the same schema (audit).
2. Please try to re-create the schema & views in TEST. Because schema-level objects sometimes mismatch. In TEST, manually drop these objects:
audit.View_2
audit.View_abcAlso check if schema audit was created manually earlier. Let deployment recreate.
3. Please try to delete Warehouse from TEST and wait for sometime and then perform redeployment.
4. If your stored procedure uses CTAS, Drop the stored proc in TEST, Redeploy and Recreate after deployment.
Please refer below links.
Solved: Re: Anyone else unable to deploy a data warehouse ... - Page 2 - Microsoft Fabric Community
Solved: Debugging Warehouse deployment errors - Microsoft Fabric Community
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
Hi ritz , Not from Solution but from root cause perspective. This is becuase Child view is being created before the parent view. Based on the information I have and i might be wrong, this is because Fabric warehouse deployment is not sequence-based. Warehouse deployments are still object-level executions wrapped as item-level deployment. Fabric deploys the warehouse as a collection of independent SQL objects. When you deploy a data warehouse using deployment pipelines, Fabric appears to deploy the entire warehouse item but internally still operates at the object/script level. So it might not guarantee that a parent view is created before its child views. I don't know if dacfx/dacpac deploy would solve this issue, but that could be worth trying, or you could flatten the views to remove inter-view dependencies.
4 Replies
- v-dineshyaCommunity Support
Hi ritz ,
Thank you for reaching out to the Microsoft Community Forum.
Please try below things to fix the issue.
1. Please check dependency order, verify that:
View_abc --> is created before View_2. All referenced objects exist under the same schema (audit).
2. Please try to re-create the schema & views in TEST. Because schema-level objects sometimes mismatch. In TEST, manually drop these objects:
audit.View_2
audit.View_abcAlso check if schema audit was created manually earlier. Let deployment recreate.
3. Please try to delete Warehouse from TEST and wait for sometime and then perform redeployment.
4. If your stored procedure uses CTAS, Drop the stored proc in TEST, Redeploy and Recreate after deployment.
Please refer below links.
Solved: Re: Anyone else unable to deploy a data warehouse ... - Page 2 - Microsoft Fabric Community
Solved: Debugging Warehouse deployment errors - Microsoft Fabric Community
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
- v-dineshyaCommunity Support
Hi ritz ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh
- v-dineshyaCommunity Support
Hi @ritz ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh
- PraveenVeliAdvocate I
Hi ritz , Not from Solution but from root cause perspective. This is becuase Child view is being created before the parent view. Based on the information I have and i might be wrong, this is because Fabric warehouse deployment is not sequence-based. Warehouse deployments are still object-level executions wrapped as item-level deployment. Fabric deploys the warehouse as a collection of independent SQL objects. When you deploy a data warehouse using deployment pipelines, Fabric appears to deploy the entire warehouse item but internally still operates at the object/script level. So it might not guarantee that a parent view is created before its child views. I don't know if dacfx/dacpac deploy would solve this issue, but that could be worth trying, or you could flatten the views to remove inter-view dependencies.