Forum Discussion

GlibAvrutin's avatar
GlibAvrutin
Regular Visitor
6 months ago
Solved

Help with Semantic Model connection

Hello guys, I'm new to the PowerBi service so please don't judge too harshly  🙂

 

The thing is that I've updated some kql RLS stuff in my dev fabric workspace and now trying to refresh the semantic model in the same workspace, but it fails because it points to the different kql database (not in my current dev workspace, error message attached). I've tried changing cloud connection but it didn't work, asked AI and searched some topics on this forum and couldn't find any good pieces of info. 

Data source error: Bad request: Semantic error: Error in row_level_security query for database("fba6f93a-
102c-4b5d-88d5-5043df92810d").table("_MV_DimResponse"): the following operators were blocked:
'summarize' (only the following operators are allowed: 'as', 'distinct', 'extend', 'join', 'limit', 'project', 'project-
away', 'project-keep', 'project-rename', 'project-reorder', 'union', 'where'). Error = Semantic error: Error in
row_level_security query for database("fba6f93a-102c-4b5d-88d5-
5043df92810d").table("_MV_DimResponse"): the following operators were blocked: 'summarize' (only the
following operators are allowed: 'as', 'distinct', 'extend', 'join', 'limit', 'project', 'project-away', 'project-keep',
'project-rename', 'project-reorder', 'union', 'where'). Code = General_BadRequest. Type =
Kusto.Data.Exceptions.SemanticException. x-ms-activity-id = e820ca64-a257-4fdc-92cb-e18fc1da7633. x-ms-
client-request-id = KPBI;cbbdb9d9-a5e3-473c-886e-8b1cb882c188;cffb9d11-fd6b-4657-8a85-
0220dda9b1f2;c3cdb7fe-cf52-4977-bdc8-0f8c62388694 .. The exception was raised by the IDbCommand
interface.

 

Thank you very much in advance for any help! 

  • Hi GlibAvrutin,

     

    The issue happens because the semantic model in your DEV workspace relies on another upstream semantic model, which is still connected to the PROD KQL database instead of the DEV one. When a semantic model uses a live connection or DirectQuery to another model, you can’t change the data source from the downstream model, so the KQL database connection doesn’t appear in the Data source settings.

    To fix this, go to the DEV workspace and check the Lineage view for your semantic model to find the upstream model or data item it depends on. If it’s pointing to the PROD KQL database, update that upstream model by changing the KQL cluster URL and database name to DEV. Save, publish, and refresh so the changes apply to dependent models.

    If you can’t modify the upstream model, it’s best to create a new semantic model in DEV that connects directly to the DEV KQL database and update your reports to use this model. For environments using deployment pipelines, setting up environment-specific parameters or data source rules ensures that DEV, TEST, and PROD models connect to the right KQL databases automatically.

     

    Thank you
    Sahasra.

9 Replies

  • v-sgandrathi's avatar
    v-sgandrathi
    Community Support

    Hi GlibAvrutin,

     

    The issue occurs because the semantic model is still set to connect to the PROD KQL database, and simply changing the cloud connection does not update the database reference in the model. In Microsoft Fabric, the KQL database details are specified in the data source connection within the semantic model.
    To resolve this, go to your DEV workspace, open the semantic model, select Edit, and then open Transform data (Power Query). Check the KQL connection step for the cluster URL and database name, which likely point to the PROD database. Update these to use the DEV KQL database, save, and republish the model. After publishing, go to Settings -- Data source credentials to re-authenticate if needed and refresh the model.

    If the model cannot be edited (such as when deployed via pipeline), you will need to redeploy it with environment-specific rules or create a new semantic model in DEV connected to the DEV KQL database. The main point is that the database reference inside the model must be updated; changing only the cloud connection will not redirect it to DEV.

    Thank you.

    • GlibAvrutin's avatar
      GlibAvrutin
      Regular Visitor

      Hi v-sgandrathi, thank you for your answer. The algorithm you gave me sounds clear enough, but I could not execute the step where I change the kql db reference of the semantic model. In the Data Source tab there are only other semantic models from other workspaces. I can provide additional info if you need it

      Thank you

  • Hi GlibAvrutin,

     

    welcome to Power BI and the community 🙂 and no worries, the community is here to help, not to judge  ðŸ˜Š

     

    So your error message indicates some trubble with the KQL query which is underlying in your KQL database. Seems like you have some semantic issues as the error states the "summarize" operator is not stated correct.

     

    Therefore it would be a good first point to start investigate the KQL query. If you can, share the query with the community then we can dive deeper. 

     

    Best regards!

    PS: If you find this post helpful consider leaving kudos or mark it as solution

  • Hi Mauro89, Thank you for your answer. Yes there were issues with KQL query in all of my fabric workspaces (dev, staging and prod) and I managed to solve them for dev database, but the semantic model located in dev workspace, which was created and configured not by me, points to the db in prod workspace, not in dev, as the id in the error message suggests. 

  • v-sgandrathi's avatar
    v-sgandrathi
    Community Support

    Hi GlibAvrutin,

     

    The issue happens because the semantic model in your DEV workspace relies on another upstream semantic model, which is still connected to the PROD KQL database instead of the DEV one. When a semantic model uses a live connection or DirectQuery to another model, you can’t change the data source from the downstream model, so the KQL database connection doesn’t appear in the Data source settings.

    To fix this, go to the DEV workspace and check the Lineage view for your semantic model to find the upstream model or data item it depends on. If it’s pointing to the PROD KQL database, update that upstream model by changing the KQL cluster URL and database name to DEV. Save, publish, and refresh so the changes apply to dependent models.

    If you can’t modify the upstream model, it’s best to create a new semantic model in DEV that connects directly to the DEV KQL database and update your reports to use this model. For environments using deployment pipelines, setting up environment-specific parameters or data source rules ensures that DEV, TEST, and PROD models connect to the right KQL databases automatically.

     

    Thank you
    Sahasra.

  • v-sgandrathi's avatar
    v-sgandrathi
    Community Support

    Hi GlibAvrutin,

     

    Since we haven't heard back from you yet, I'd like to confirm if you've successfully resolved this issue or if you need further help?

    If you still have any questions or need more support, please feel free to let us know. 

    We are more than happy to continue to help you.

  • v-sgandrathi's avatar
    v-sgandrathi
    Community Support

    Hi GlibAvrutin,

     

    Following up to see how things are going with your issue. Has the response provided resolved your query? We’d love to know if you need more help or if everything’s working fine now.

     

    Thanks for staying active in the Microsoft Fabric Community!