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)
--via-mcp bool No Execute via the remote Fabric DW MCP server (Fabric token, no direct TDS/1433)

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

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

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

Examples

Terminal window
fabio warehouse mcp-url --workspace $WS --id $WH

Read-only · Returns object

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

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

Examples

Terminal window
fabio warehouse list-tables --workspace $WS --id $WH --schema dbo

Read-only · Returns list

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

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

Examples

Terminal window
fabio warehouse describe-table --workspace $WS --id $WH --table dbo.Orders

Read-only · Returns list

Bulk-load files from Azure storage / OneLake into a table with COPY INTO

Terminal window
fabio warehouse copy-into --workspace <value> --id <value> --table <value> --source <value> --file-type <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Warehouse ID
--table string Yes Target table, optionally schema-qualified (e.g. dbo.Orders). Must already exist
--source string Yes Source location: HTTPS Azure storage / OneLake URL (file or folder/wildcard)
--file-type string Yes File format of the source data
--columns string No Optional target column list (comma-separated), matching the source order
--field-terminator string No CSV field terminator (e.g. ,)
--row-terminator string No CSV row terminator (e.g. \n)
--first-row integer No CSV first data row (e.g. 2 to skip a header row)
--encoding string No CSV encoding (UTF8 or UTF16)
--sas-token string No SAS token for the source storage (omit to use the caller’s Entra ID)
--auth-mode enum No Source authentication mode. entra-id (default) uses the caller’s Entra identity; sas uses –sas-token; workspace-identity uses the Fabric workspace’s managed identity (no secret; the workspace identity must be granted access to the source, e.g. Storage Blob Data Reader) One of: entra-id, sas, workspace-identity.

Examples

Terminal window
fabio warehouse copy-into --workspace $WS --id $WH --table dbo.Orders --source https://acct.dfs.core.windows.net/c/data/*.parquet --file-type PARQUET
Terminal window
fabio warehouse copy-into --workspace $WS --id $WH --table dbo.Raw --source https://acct.blob.core.windows.net/c/data.csv --file-type CSV --first-row 2 --dry-run

Mutates state · 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 integer No Retention period in days
--audit-actions string No Comma-separated list of audit actions
--predicate-expression string No Predicate expression without WHERE (max 3000 chars; empty string removes it)

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 array 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 (add –follow to watch live)

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
--follow bool No Continuously poll and stream NDJSON until --max-duration, --limit, or Ctrl-C (watch active queries live). The command always terminates
--interval integer No Seconds between polls in --follow mode (default 5)
--max-duration integer No Total seconds to follow before stopping — the agent-safety bound (default 60)
--dedup-column string No In --follow, only emit queries whose value in this column exceeds the max seen so far (e.g. session_id); without it each cycle re-emits the full snapshot (watch semantics)

Read-only · Returns list

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 integer 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 integer 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 integer 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 integer 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 integer 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 integer Yes Retention period in days (1-120). Decreasing it is irreversible (older history is garbage-collected)

Mutates state · Destructive · Returns void