Forum Discussion
Different behaviour between SQL database and SQL Analytics endpoint
- 3 months ago
Hi pmscorca ,
To align the SQL Analytics Endpoint with the SQL Database Editor, you need to explicitly call the Fabric REST API refreshMetadata operation. This forces the endpoint to sync its schema with the latest definitions.You don’t use this API inside the SQL Database Editor or SQL Analytics Endpoint UI directly it’s a REST API call that you trigger from your own automation or client code. In practice, you’d use it in one of these places:
1. Fabric Pipelines → Add a Web activity after your ingestion/transform steps to call the refreshMetadata API, so the SQL Analytics Endpoint is always aligned before downstream reporting.
2. Notebooks → Use Python (with requests or http libraries) to call the API as part of your workflow.
3. External scripts → PowerShell, Python, or any HTTP client can invoke the endpoint. This is common if you’re orchestrating refreshes outside Fabric.
4. CI/CD automation → Integrate the call into deployment pipelines so schema changes are automatically reflected in the SQL Analytics Endpoint.
For more details, you can refer to the official documentation:
Items - Refresh Sql Endpoint Metadata - REST API (SQLEndpoint) | Microsoft Learn
Thank you.
Hi pmscorca
The reason for including the SQL analytics endpoint with Fabric SQL Database, wrt architecture, is mainly about separating OLTP and OLAP workloads, i.e to separate operational processing from analytical consumption.
While the SQL Database handles transactional (OLTP) operations, like CRUD support and reads/writes, but running heavy analytical queries on the same can impact performance.
So the SQL analytics endpoint will handle the analytical queries over the same data without the need for any data movement (like running pipelines, ETL... etc)
Also its not that a SQL Endpoint might make more sense in a warehouse as a warehouse is already optimized for heavy analytics, but there are limitations to the operational queries you can perform in warehouse than in SQL DB.
In short, even though a SQL analytics endpoint is also useful for lakehouses/warehouses, in the case of Fabric SQL Database it exists to provide a built-in analytics for the same database, without requiring any external setup or movment.
Hope this helps!
Thanks
Aparnaa
Hi,
for me it makes little sense to query an OLTP SQL database for analytical purposes without tranforming it in a data warehouse.
However, the two layers remain disaligned after some object creation or drop operations; it's not a question of waiting time.
- v-anbandari3 months agoCommunity Support
Hi pmscorca ,
The SQL Analytics endpoint is kept in sync with the SQL Database through a background metadata synchronization process.This process runs automatically when the SQL Analytics endpoint is active and typically reflects changes within seconds to a minute. However, it is not strictly real-time or deterministic, and in some scenarios changes (such as table create/drop) may not appear immediately or consistently.
In such cases, Microsoft recommends triggering an on-demand metadata sync instead of waiting for the background process.
You can do this by:
1. Using the Refresh option in the SQL query editor, or
2. Triggering the SQL Endpoint Metadata Refresh API
This forces the SQL Analytics endpoint to update with the latest changes from the SQL Database.
If the issue still persists even after a manual refresh, it may need further investigation.
For more details, you can refer to the official documentation:
Items - Refresh Sql Endpoint Metadata - REST API (SQLEndpoint) | Microsoft Learn
Thank you.- pmscorca3 months agoKudo Kingpin
Hi,
I already refreshed both the SQL Database Editor and the SQL Analytics Endpoint Editor some time ago, but the SQL Analytics Endpoint isn't aligned with the SQL Database Editor yet.
I don't understand how triggering the SQL Endpoint Metadata Refresh API.
Thanks- v-anbandari3 months agoCommunity Support
Hi pmscorca ,
To align the SQL Analytics Endpoint with the SQL Database Editor, you need to explicitly call the Fabric REST API refreshMetadata operation. This forces the endpoint to sync its schema with the latest definitions.You don’t use this API inside the SQL Database Editor or SQL Analytics Endpoint UI directly it’s a REST API call that you trigger from your own automation or client code. In practice, you’d use it in one of these places:
1. Fabric Pipelines → Add a Web activity after your ingestion/transform steps to call the refreshMetadata API, so the SQL Analytics Endpoint is always aligned before downstream reporting.
2. Notebooks → Use Python (with requests or http libraries) to call the API as part of your workflow.
3. External scripts → PowerShell, Python, or any HTTP client can invoke the endpoint. This is common if you’re orchestrating refreshes outside Fabric.
4. CI/CD automation → Integrate the call into deployment pipelines so schema changes are automatically reflected in the SQL Analytics Endpoint.
For more details, you can refer to the official documentation:
Items - Refresh Sql Endpoint Metadata - REST API (SQLEndpoint) | Microsoft Learn
Thank you.