Forum Discussion
Semantic Model not reading Warehouse schema changes right away
- Anonymous1 year ago
Hi ToddChitt,
Thanks for reaching out to the Microsoft fabric community forum.
I encountered this issue as well and, after a thorough investigation, identified a reliable solution.
When you create a new table or view in your Fabric Warehouse, it often doesn’t appear in your custom semantic model right away, even after selecting "Refresh Schema." This delay, which can last several minutes or longer, is due to Fabric caching metadata between the Warehouse and Semantic Model for performance reasons. As a result, schema changes may not show up immediately.
To resolve this and have new objects appear instantly, follow these steps:
1. Create your table or view in the Warehouse.
2. Run a simple query against the new object, such as:SELECT TOP 1 * FROM sys.tables;
3. Use the Fabric REST API to trigger a manual metadata refresh. For example, in Python:
import sempy.fabric as fabric
client = fabric.FabricRestClient()
uri = f"/v1.0/myorg/lhdatamarts/{SQL_ENDPOINT_ID}"
payload = {"commands": [{"$type": "MetadataRefreshCommand"}]}
resp = client.post(uri, json=payload)Be sure to replace {SQL_ENDPOINT_ID} with your Warehouse SQL endpoint ID.
4. Return to your Semantic Model, select Edit Tables > Refresh Schema, and your new table or view should appear immediately.
If the response has addressed your query, please "Accept it as a solution" and give a "Kudos" so other members can easily find it.
Best Regards,
Tejaswi.
Community Support
Hi ToddChitt,
Thanks for reaching out to the Microsoft fabric community forum.
I encountered this issue as well and, after a thorough investigation, identified a reliable solution.
When you create a new table or view in your Fabric Warehouse, it often doesn’t appear in your custom semantic model right away, even after selecting "Refresh Schema." This delay, which can last several minutes or longer, is due to Fabric caching metadata between the Warehouse and Semantic Model for performance reasons. As a result, schema changes may not show up immediately.
To resolve this and have new objects appear instantly, follow these steps:
1. Create your table or view in the Warehouse.
2. Run a simple query against the new object, such as:
SELECT TOP 1 * FROM sys.tables;
3. Use the Fabric REST API to trigger a manual metadata refresh. For example, in Python:
import sempy.fabric as fabric
client = fabric.FabricRestClient()
uri = f"/v1.0/myorg/lhdatamarts/{SQL_ENDPOINT_ID}"
payload = {"commands": [{"$type": "MetadataRefreshCommand"}]}
resp = client.post(uri, json=payload)
Be sure to replace {SQL_ENDPOINT_ID} with your Warehouse SQL endpoint ID.
4. Return to your Semantic Model, select Edit Tables > Refresh Schema, and your new table or view should appear immediately.
If the response has addressed your query, please "Accept it as a solution" and give a "Kudos" so other members can easily find it.
Best Regards,
Tejaswi.
Community Support
Hi ToddChitt ,
Just checking in have you been able to resolve this issue? If so, it would be greatly appreciated if you could mark the most helpful reply accordingly. This helps other community members quickly find relevant solutions.
Thank You.
- Anonymous1 year agoNot applicable
Hi ToddChitt,
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.
Thank you.
- Anonymous1 year agoNot applicable
Hi ToddChitt ,
I hope the information provided has been useful. Please let me know if you need further clarification.
Thank you.