Skip to content

sql-endpoint

Manage SQL endpoints (analytics endpoints for lakehouses)

Authentication scope: fabric

List SQL endpoints in a workspace

Terminal window
fabio sql-endpoint list --workspace <value>
Flag Type Required Description
--workspace string Yes Workspace ID

Examples

Terminal window
fabio sql-endpoint list --workspace $WS -o table

Read-only · Returns list

Show details of a SQL endpoint

Terminal window
fabio sql-endpoint show --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes SQL endpoint ID

Read-only · Returns object

Get the SQL connection string for a SQL endpoint

Terminal window
fabio sql-endpoint connection-string --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes SQL endpoint ID
--guest-tenant-id string No Guest tenant ID (if different from the SQL endpoint’s tenant)
--private-link-type string No Private link type: None or Workspace

Examples

Terminal window
fabio sql-endpoint connection-string --workspace $WS --id $SQLEP

Read-only · Returns object

Execute a SQL query against a SQL endpoint

Terminal window
fabio sql-endpoint query --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes SQL endpoint ID
--sql string No SQL query text, @file path, or omit for stdin
--via-mcp bool No Execute via the remote Fabric DW MCP server (Fabric token, no direct TDS/1433)

Examples

Terminal window
fabio sql-endpoint query --workspace $WS --id $ID --sql "SELECT TOP 10 * FROM dbo.my_table"
Terminal window
fabio sql-endpoint query --workspace $WS --id $ID --sql @query.sql
Terminal window
echo "SELECT 1" | fabio sql-endpoint query --workspace $WS --id $ID
Terminal window
fabio sql-endpoint query --workspace $WS --id $SQLEP --sql "SELECT TOP 10 * FROM dbo.sales ORDER BY order_date DESC"

Read-only · Returns list

Capture the estimated execution plan (SHOWPLAN_XML) without executing the query

Terminal window
fabio sql-endpoint plan --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes SQL endpoint ID
--sql string No SQL query to plan (prefix with @ to read from file, omit to read from stdin)

Read-only · Returns object

Print the remote Fabric Data Warehouse MCP server URLs (item-scoped + global) for agent consumption

Terminal window
fabio sql-endpoint mcp-url --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes SQL endpoint ID

Examples

Terminal window
fabio sql-endpoint mcp-url --workspace $WS --id $SQLEP

Read-only · Returns object

List tables and views in a SQL endpoint (from INFORMATION_SCHEMA.TABLES)

Terminal window
fabio sql-endpoint list-tables --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes SQL endpoint ID
--schema string No Only list tables in this schema (e.g. dbo)

Examples

Terminal window
fabio sql-endpoint list-tables --workspace $WS --id $SQLEP

Read-only · Returns list

Describe the columns of a table (from INFORMATION_SCHEMA.COLUMNS)

Terminal window
fabio sql-endpoint describe-table --workspace <value> --id <value> --table <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes SQL endpoint ID
--table string Yes Table name, optionally schema-qualified (e.g. dbo.Customers or Customers)

Examples

Terminal window
fabio sql-endpoint describe-table --workspace $WS --id $SQLEP --table dbo.Customers

Read-only · Returns list

Refresh metadata for all or selected tables in a SQL endpoint (LRO)

Terminal window
fabio sql-endpoint refresh-metadata --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes SQL endpoint ID
--timeout string No Timeout JSON with value and timeUnit (inline or @file; default: 15 Minutes, maximum: 24 Hours)
--recreate-tables bool No Drop and recreate SQL metadata for selected tables, or all tables if unscoped
--tables string No Table selectors as JSON (inline or @file), up to 25 tables

Examples

Terminal window
fabio sql-endpoint refresh-metadata --workspace $WS --id $EP
Terminal window
fabio sql-endpoint refresh-metadata --workspace $WS --id $EP --tables '[{"schema":"dbo","tableNames":["Orders","OrderDetails"]}]'
Terminal window
fabio sql-endpoint refresh-metadata --workspace $WS --id $EP --recreate-tables --tables @tables.json --timeout '{"value":10,"timeUnit":"Minutes"}' --dry-run

Mutates state · Destructive · Long-running operation · Returns list

Get SQL audit settings for the endpoint

Terminal window
fabio sql-endpoint get-audit-settings --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes SQL endpoint ID

Read-only · Returns object

Update SQL audit settings for the endpoint

Terminal window
fabio sql-endpoint update-audit-settings --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes SQL endpoint ID
--state string No Audit state: Enabled or Disabled
--retention-days integer No Retention days (0 = indefinite)
--audit-actions array No Audit actions and groups (comma-separated)
--predicate-expression string No Predicate expression without WHERE (max 3000 chars; empty string removes it)

Examples

Terminal window
fabio sql-endpoint update-audit-settings --workspace $WS --id $EP --predicate-expression "NOT statement LIKE 'SELECT %'" --dry-run

Mutates state · Returns object

Set audit actions and groups for the endpoint

Terminal window
fabio sql-endpoint set-audit-actions --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes SQL endpoint ID
--actions array No Audit actions and groups (comma-separated)

Mutates state · Returns object

List currently running queries on a SQL endpoint

Terminal window
fabio sql-endpoint queries-running --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes SQL endpoint ID

Read-only · Returns object

List frequently-run queries (from queryinsights.frequently_run_queries)

Terminal window
fabio sql-endpoint queries-frequent --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes SQL endpoint ID
--top integer No Maximum rows to return (default: 100)

Read-only · Returns object

List long-running queries (from queryinsights.long_running_queries)

Terminal window
fabio sql-endpoint queries-long-running --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes SQL endpoint ID
--top integer No Maximum rows to return (default: 100)

Read-only · Returns object

List completed query history (from queryinsights.exec_requests_history)

Terminal window
fabio sql-endpoint queries-history --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes SQL endpoint ID
--top integer No Maximum rows to return (default: 100)
--label string No Filter to queries tagged with this OPTION (LABEL = ‘…’) value

Read-only · Returns object

Report SQL pool state changes and sustained pressure events (from queryinsights.sql_pool_insights)

Terminal window
fabio sql-endpoint pool-insights --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes SQL endpoint ID
--top integer No Maximum rows to return (default: 100)

Read-only · Returns object