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

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

Refresh metadata for all 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

Mutates state · 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 string No Retention days (0 = indefinite)
--audit-actions string No Audit actions and groups (comma-separated)
--predicate-expression string No Predicate expression for filtering audit logs

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 string 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 string 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 string 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 string 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 string No Maximum rows to return (default: 100)

Read-only · Returns object