list_table_sync_status
Shows per-table metadata sync freshness for SQL Analytics Endpoints, flagging tables absent from the catalog and cross-checking Lakehouse inventory to uncover undiscovered tables.
Instructions
Show per-table metadata sync freshness via sys.dm_db_external_tables_log_status.
Only supported on SQL Analytics Endpoints (not Data Warehouses), and only
on endpoints created after the workspace's 'New metadata sync' (preview)
setting was enabled. A table with no matching DMV row still appears, with
its sync fields null instead of the row being dropped -- this means no
sync information is available for that table, NOT that it has never
synced; do not treat a null row as proof the table has never synced.
IMPORTANT for agents: by default this listing only includes tables
already present in the endpoint's catalog (sys.tables), which is
itself maintained by the metadata sync. A Lakehouse table whose
discovery has not completed, or has failed, has no catalog row and so
is absent from this result entirely -- it will not appear as a row
with empty fields, it simply will not be there. Do not conclude a
table does not exist, or was deleted, just because it is missing from
this list.
Pass check_lakehouse=True to close part of that gap: it
cross-references the backing Lakehouse's own table inventory (one or
more extra REST calls -- avoid setting this on every call of a tool an
agent may invoke repeatedly) and adds a row with
in_endpoint_catalog=false and all sync fields null for every
table it finds there but not in the catalog, comparing names exactly
(case-sensitively, matching Fabric's default collation). A Lakehouse
table that differs from a catalog table only by case gets
case_mismatched_catalog_name set to that catalog name instead of
being reported as a flat miss.
This works for both classic and schema-enabled Lakehouse-backed
endpoints (the schema-enabled path uses a preview OneLake table API).
If the endpoint's backing item cannot be resolved to a Lakehouse at
all (a mirrored database, or similar), check_lakehouse=True
raises a ToolError explaining why, rather than silently returning
the unchanged catalog-only result: a caller that explicitly asked for
this cross-check must never read "no extra rows" as "fully
discovered". check_lakehouse=True also cannot be combined with
schema or table (raises a ToolError): it always compares the
whole endpoint. If check_lakehouse=True fails or an expected table
is still missing after trying it, call
refresh_sql_endpoint_metadata (or tell the user to run
fdw sql-endpoints refresh) to force an item-level sync, then check
again.
Args:
workspace: Workspace name or GUID.
item: SQL Analytics Endpoint name or GUID. Data Warehouses are
rejected with a ToolError.
schema: When provided, only tables in this schema are returned.
table: When provided, filter to this single (bare, unqualified)
table name. Requires schema to also be given.
check_lakehouse: When True, cross-reference the backing
Lakehouse's table inventory for tables missing from the
endpoint catalog entirely. See above for its limits. Mutually
exclusive with schema and table.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspace": "<workspace>",
"item": "<item>"
},
"name": "list_table_sync_status"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | Yes | ||
| table | No | ||
| schema | No | ||
| workspace | Yes | ||
| check_lakehouse | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |