Skip to content

warehouse

Manage warehouses and run SQL queries

Authentication scope: fabric

List warehouses in a workspace

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

Output fields: id, displayName, description

Read-only · Returns list

Show details of a warehouse

Terminal window
fabio warehouse show --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse ID

Output fields: id, displayName, description, properties

Read-only · Returns object

Create a new warehouse

Terminal window
fabio warehouse create --workspace <value> --name <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--name string Yes Warehouse display name
--description string No Optional description
--sensitivity-label string No Sensitivity label ID to apply on creation
--collation string No Collation for the warehouse (create-time only). Values: Latin1_General_100_BIN2_UTF8 (case-sensitive, default) or Latin1_General_100_CI_AS_KS_WS_SC_UTF8 (case-insensitive)

Examples

Terminal window
fabio warehouse create --workspace $WS --name "SalesWarehouse"

Output fields: id, displayName

Mutates state · Returns object

Update warehouse properties (name and/or description)

Terminal window
fabio warehouse update --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse ID
--name string No New display name
--description string No New description

Mutates state · Returns object

Delete a warehouse

Terminal window
fabio warehouse delete --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse ID
--hard-delete bool No Permanently delete (cannot be recovered)

Mutates state · Destructive · Returns void

Execute a SQL query against a warehouse or SQL endpoint

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

Examples

Terminal window
fabio warehouse query --workspace $WS --id $WH --sql "SELECT TOP 100 * FROM dbo.fact_sales ORDER BY order_date DESC"
Terminal window
fabio warehouse query --workspace $WS --id $WH --sql @queries/monthly_report.sql

Mutates state · Returns list

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

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

Read-only · Returns object

Get the connection string for a warehouse

Terminal window
fabio warehouse connection-string --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse ID
--guest-tenant-id string No Guest tenant ID (for cross-tenant access)
--private-link-type string No Private link type (for private endpoint access)

Examples

Terminal window
fabio warehouse connection-string --workspace $WS --id $WH

Read-only · Returns object

Get SQL pools configuration for a workspace

Terminal window
fabio warehouse get-sql-pools-config --workspace <value>
Flag Type Required Description
--workspace string Yes Workspace ID

Read-only · Returns object

Update SQL pools configuration for a workspace

Terminal window
fabio warehouse update-sql-pools-config --workspace <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--file string No Path to JSON file with configuration (prefix with @)
--content string No Inline JSON content

Mutates state · Returns void

Get SQL audit settings for a warehouse

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

Read-only · Returns object

Update SQL audit settings for a warehouse

Terminal window
fabio warehouse update-audit-settings --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse ID
--state string No Audit state (e.g. Enabled, Disabled)
--retention-days string No Retention period in days
--audit-actions string No Comma-separated list of audit actions

Mutates state · Returns void

Set audit actions and groups for a warehouse

Terminal window
fabio warehouse set-audit-actions --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse ID
--actions string No Comma-separated list of audit actions and groups

Mutates state · Returns void

List restore points for a warehouse

Terminal window
fabio warehouse list-restore-points --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse ID

Examples

Terminal window
fabio warehouse list-restore-points --workspace $WS --id $WH -o table

Read-only · Returns list

Create a restore point for a warehouse

Terminal window
fabio warehouse create-restore-point --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse ID
--name string No Display name for the restore point
--description string No Optional description for the restore point

Examples

Terminal window
fabio warehouse create-restore-point --workspace $WS --id $WH --name "pre-migration"

Mutates state · Returns object

Show details of a restore point

Terminal window
fabio warehouse show-restore-point --workspace <value> --id <value> --restore-point-id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse ID
--restore-point-id string Yes Restore point ID

Read-only · Returns object

Update a restore point

Terminal window
fabio warehouse update-restore-point --workspace <value> --id <value> --restore-point-id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse ID
--restore-point-id string Yes Restore point ID
--name string No New display name for the restore point
--description string No New description for the restore point

Mutates state · Returns void

Delete a restore point

Terminal window
fabio warehouse delete-restore-point --workspace <value> --id <value> --restore-point-id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse ID
--restore-point-id string Yes Restore point ID

Mutates state · Destructive · Returns void

Restore a warehouse to a restore point

Terminal window
fabio warehouse restore-to-point --workspace <value> --id <value> --restore-point-id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse ID
--restore-point-id string Yes Restore point ID

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

List currently running queries on a warehouse

Terminal window
fabio warehouse queries-running --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse or Lakehouse ID

Read-only · Returns object

List frequently-run queries (from queryinsights.frequently_run_queries)

Terminal window
fabio warehouse queries-frequent --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse or Lakehouse 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 warehouse queries-long-running --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse or Lakehouse 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 warehouse queries-history --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse or Lakehouse 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

Kill a running query session by session ID

Terminal window
fabio warehouse queries-kill --workspace <value> --id <value> --session-id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse or Lakehouse ID
--session-id string Yes Session ID to terminate

Mutates state · Destructive · Returns object

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

Terminal window
fabio warehouse pool-insights --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse or Lakehouse ID
--top string No Maximum rows to return (default: 100)

Read-only · Returns object

List user-defined statistics on a warehouse or SQL endpoint

Terminal window
fabio warehouse statistics-list --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse or Lakehouse ID
--table string No Filter by table name (schema.table)

Read-only · Returns object

Show details of a statistic (header, density vector, histogram)

Terminal window
fabio warehouse statistics-show --workspace <value> --id <value> --name <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse or Lakehouse ID
--name string Yes Statistic name to inspect

Read-only · Returns object

Create a user-defined statistic on a column

Terminal window
fabio warehouse statistics-create --workspace <value> --id <value> --table <value> --column <value> --name <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse or Lakehouse ID
--table string Yes Schema-qualified table name (e.g., dbo.orders)
--column string Yes Column name to create statistics on
--name string Yes Name for the new statistic

Mutates state · Returns object

Update (refresh) an existing statistic

Terminal window
fabio warehouse statistics-update --workspace <value> --id <value> --name <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse or Lakehouse ID
--name string Yes Statistic name to update

Mutates state · Returns object

Delete a user-defined statistic

Terminal window
fabio warehouse statistics-delete --workspace <value> --id <value> --name <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse or Lakehouse ID
--name string Yes Statistic name to delete

Mutates state · Returns object

Report the configured data-retention (time-travel) period, in days

Terminal window
fabio warehouse get-retention --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse ID

Read-only · Returns object

Configure the data-retention (time-travel) period, in days (1-120)

Terminal window
fabio warehouse set-retention --workspace <value> --id <value> --days <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse ID
--days string Yes Retention period in days (1-120). Decreasing it is irreversible (older history is garbage-collected)

Mutates state · Destructive · Returns void