Forum Discussion

AlessioAndriulo's avatar
AlessioAndriulo
Icon for Advocate I rankAdvocate I
9 months ago
Solved

Deploying a Multi-Schema Warehouse in Fabric

Hi everyone,
I'm working on a project in Microsoft Fabric where I have a Data Warehouse with multiple schemas, and I've run into a frustrating issue during deployment.

When I try to deploy the warehouse using Deployment Pipelines, the process fails on the DWH schemas with this error:

Backend Error: Import failure: DmsImportDatabaseException

The warehouse works perfectly in the development environment, but when I attempt to promote it to the next stages (Test ), the deployment fails.

Has anyone encountered the same DmsImportDatabaseException error with multi-schema warehouses?
Is there a known limitation with Deployment Pipelines when working with multiple schemas?

  • Hi AlessioAndriulo ,

     

    I feel your pain. The DmsImportDatabaseException is one of those generic wrapper errors in Fabric that doesn't tell you what is wrong, just that the metadata application failed on the target.

    Since this works in Dev but fails in Test, you are likely hitting a metadata validation rule or a known limitation with the "Apply" phase of the deployment pipeline.

     

    Here are the 3 most common triggers for this specific error with Multi-Schema Warehouses:

    1. Special Characters in Schema Names Fabric Deployment Pipelines have a known sensitivity to special characters in schema names.

    • Check: Do any of your new schemas contain a hyphen (-) or a dot (.) in their name? For example sales-data vs sales_data.

    • Fix: If yes, try renaming them to use underscores (_). There have been reports where schemas with hyphens cause the deployment to fail with exactly this error.

    2. Relationships in the Model There is a known issue where deploying a Warehouse that has relationships defined in the Model View can trigger this exception.

    • Test: As a test, try temporarily deleting the relationships in Dev (or create a branch without them) and see if the deployment succeeds. If it does, you might need to apply relationships via T-SQL scripts after deployment until this bug is patched.

    3. The "Create Statement" Limit If you have very wide tables or complex views in your new schemas, check if the generated CREATE statement is extremely long.

    • The deployment process generates a script behind the scenes. If a single table definition is massive, it can hit a hard character limit during the import process.

    My Recommendation: Start by checking the Schema Names for any special characters. If that looks clean, look at your Relationships.

     

    If you are blocked and need to move to Test today, the most reliable workaround is to use a Database Project (VS Code) to extract the schema as a .sqlproj and deploy it using SQLPackage. This bypasses the Pipeline's native logic for now.

     

    Let us know if it was the hyphen!


    If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.

    This response was assisted by AI for translation and formatting purposes.

10 Replies

  • Hi AlessioAndriulo ,

     

    I feel your pain. The DmsImportDatabaseException is one of those generic wrapper errors in Fabric that doesn't tell you what is wrong, just that the metadata application failed on the target.

    Since this works in Dev but fails in Test, you are likely hitting a metadata validation rule or a known limitation with the "Apply" phase of the deployment pipeline.

     

    Here are the 3 most common triggers for this specific error with Multi-Schema Warehouses:

    1. Special Characters in Schema Names Fabric Deployment Pipelines have a known sensitivity to special characters in schema names.

    • Check: Do any of your new schemas contain a hyphen (-) or a dot (.) in their name? For example sales-data vs sales_data.

    • Fix: If yes, try renaming them to use underscores (_). There have been reports where schemas with hyphens cause the deployment to fail with exactly this error.

    2. Relationships in the Model There is a known issue where deploying a Warehouse that has relationships defined in the Model View can trigger this exception.

    • Test: As a test, try temporarily deleting the relationships in Dev (or create a branch without them) and see if the deployment succeeds. If it does, you might need to apply relationships via T-SQL scripts after deployment until this bug is patched.

    3. The "Create Statement" Limit If you have very wide tables or complex views in your new schemas, check if the generated CREATE statement is extremely long.

    • The deployment process generates a script behind the scenes. If a single table definition is massive, it can hit a hard character limit during the import process.

    My Recommendation: Start by checking the Schema Names for any special characters. If that looks clean, look at your Relationships.

     

    If you are blocked and need to move to Test today, the most reliable workaround is to use a Database Project (VS Code) to extract the schema as a .sqlproj and deploy it using SQLPackage. This bypasses the Pipeline's native logic for now.

     

    Let us know if it was the hyphen!


    If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.

    This response was assisted by AI for translation and formatting purposes.

    • svenchio's avatar
      svenchio
      Icon for Super User rankSuper User

      This is great answer burakkaragoz , very useful, I have not encounter this issue myself, but I would definately have your response as handy reference. All the best. 

      • burakkaragoz's avatar
        burakkaragoz
        Icon for Super User rankSuper User

        Thanks for the kind words!

        Fabric is evolving so fast that documenting these specific error codes and edge cases is really important for all of us. I am glad you found it useful to keep as a reference for your future projects.

        See you around the community!

    • pmscorca's avatar
      pmscorca
      Icon for Post Prodigy rankPost Prodigy

      Hi burakkaragoz , many thanks for your interesting reply.

      I think that it is always better to use the underscore char to separate the words for naming schemas or tables.

      Now, what do you mean with relationships in the model? Relations between tables with a constraint (foreigh key) or, more in general, dependencies (f.e. a view depends on the queried tables).

      However, deployment pipelines aren't yet mature to adopt and it's a pity!

      Thanks

      • burakkaragoz's avatar
        burakkaragoz
        Icon for Super User rankSuper User

        Hi pmscorca ,
        You are absolutely right about the naming convention. Sticking to underscores is always the safest bet in cloud data platforms to avoid these parsing headaches.

        Regarding your question on "Relationships in the Model": I am specifically referring to the Semantic Relationships created via the "Model" view in the Fabric UI (the button at the bottom left of the Warehouse editor), rather than standard SQL Foreign Key constraints.

        • The Nuance: In Fabric, you can define relationships that behave like soft constraints for the default Power BI dataset (Direct Lake mode).

        • The Bug: The Deployment Pipeline sometimes fails to deserialize these semantic relationships during the deployment to the target workspace, causing the generic DmsImportDatabaseException.

        It is definitely a growing pain of the platform. The workaround for now is to rely on standard SQL constraints (ALTER TABLE...) for data integrity and keep the semantic model relationships strictly in the Power BI dataset layer, rather than the Warehouse layer, until the pipelines mature a bit more.

        Thanks for the discussion!

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi AlessioAndriulo,

    I would also take a moment to thank burakkaragoz  , pmscorca, svenchio  for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
     

    I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

    Regards,
    Community Support Team.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi AlessioAndriulo,
      I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We are always here to support you.


      Regards,
      Community Support Team.