Skip to content

kql-database

Manage KQL databases (within eventhouses)

Authentication scope: fabric

List KQL databases in a workspace

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

Read-only · Returns list

Show details of a KQL database

Terminal window
fabio kql-database show --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID

Read-only · Returns object

Create a new KQL database

Terminal window
fabio kql-database create --workspace <value> --name <value> --eventhouse-id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--name string Yes Database display name
--description string No Optional description
--eventhouse-id string Yes Parent eventhouse item ID
--database-type enum No Database type: ReadWrite or ReadOnlyFollowing One of: ReadWrite, ReadOnlyFollowing.
--sensitivity-label string No Sensitivity label ID to apply on creation

Examples

Terminal window
fabio kql-database create --workspace $WS --name "SensorDB" --eventhouse-id $EH

Mutates state · Returns object

Update KQL database properties (name and/or description)

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

Mutates state · Returns object

Delete a KQL database

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

Mutates state · Destructive · Returns void

Execute a KQL query against a KQL database

Terminal window
fabio kql-database query --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--kql string No KQL query text (use @file.kql to read from file, or pipe via stdin)
--query-uri string No Override the Kusto query URI (auto-discovered from database properties if omitted)

Examples

Terminal window
fabio kql-database query --workspace $WS --id $KDB --kql ".create table SensorEvents (DeviceId: string, Temperature: real, Timestamp: datetime)"
Terminal window
fabio kql-database query --workspace $WS --id $KDB --kql "SensorEvents | where Timestamp > ago(1h) | summarize avg(Temperature) by DeviceId"

Read-only · Returns object

List entities (tables, materialized views, external tables, functions) in a database

Terminal window
fabio kql-database list-entities --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--entity-type string No Filter by entity type: table, materialized-view, external-table, function
--query-uri string No Override the Kusto query URI

Examples

Terminal window
fabio kql-database list-entities --workspace $WS --id $KDB
Terminal window
fabio kql-database list-entities --workspace $WS --id $KDB --entity-type table

Read-only · Returns list

Get schema for all entities in a database

Terminal window
fabio kql-database describe --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--query-uri string No Override the Kusto query URI

Examples

Terminal window
fabio kql-database describe --workspace $WS --id $KDB

Read-only · Returns list

Get detailed schema for a specific entity (table, view, function)

Terminal window
fabio kql-database describe-entity --workspace <value> --id <value> --entity-name <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--entity-name string Yes Entity name (table, materialized view, external table, or function)
--entity-type string No Entity type: table (default), materialized-view, external-table, function
--query-uri string No Override the Kusto query URI

Examples

Terminal window
fabio kql-database describe-entity --workspace $WS --id $KDB --entity-name SensorEvents

Read-only · Returns object

Sample rows from a table, materialized view, external table, or function

Terminal window
fabio kql-database sample --workspace <value> --id <value> --entity-name <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--entity-name string Yes Entity name to sample from
--count integer No Number of rows to sample (default: 10)
--entity-type string No Entity type: table (default), materialized-view, external-table, function
--query-uri string No Override the Kusto query URI

Examples

Terminal window
fabio kql-database sample --workspace $WS --id $KDB --entity-name SensorEvents --count 5

Read-only · Returns list

Ingest data into a KQL table — inline (small) or from OneLake/blob storage (large files)

Terminal window
fabio kql-database ingest --workspace <value> --id <value> --table <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--table string Yes Target table name
--data string No Inline CSV data to ingest (or use @file to read from file, or pipe via stdin). Limited to ~4 MB. For larger data use –source-path (OneLake/blob ingestion)
--source-path string No Ingest from a storage source instead of inline. Either a full HTTPS URL to a trusted Microsoft endpoint (OneLake / ADLS Gen2) OR, together with –source-lakehouse, a lakehouse-relative path like Files/raw/payments.json. No ~4 MB size limit
--source-lakehouse string No Source lakehouse item ID. When set, –source-path is treated as a path within this lakehouse (Files/... or Tables/...) and resolved to a OneLake blob URL
--source-workspace string No Workspace hosting the source lakehouse (defaults to –workspace)
--format string No Data format for storage ingestion: Csv, Tsv, Json, MultiJson, Parquet (default: Csv). Ignored for inline ingestion (always CSV)
--ignore-first-record bool No For Csv/Tsv storage ingestion: skip the first (header) row
--query-uri string No Override the Kusto query URI

Examples

Terminal window
fabio kql-database ingest --workspace $WS --id $KDB --table SensorEvents --data "DeviceId,Temperature,Timestamp\ndev-001,23.5,2026-06-18T10:00:00Z"

Mutates state · Returns object

Show execution plan for a KQL query without running it

Terminal window
fabio kql-database show-queryplan --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--kql string No KQL query to analyze (use @file.kql to read from file, or pipe via stdin)
--query-uri string No Override the Kusto query URI

Examples

Terminal window
fabio kql-database show-queryplan --workspace $WS --id $KDB --kql "SensorEvents | summarize avg(Temperature) by bin(Timestamp, 1h)"

Read-only · Returns list

Run cluster diagnostics (capacity, health, ingestion failures)

Terminal window
fabio kql-database diagnostics --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--query-uri string No Override the Kusto query URI

Examples

Terminal window
fabio kql-database diagnostics --workspace $WS --id $KDB

Read-only · Returns object

Generate a deeplink URL for a KQL query in Fabric portal or ADX Web Explorer

Terminal window
fabio kql-database deeplink --workspace <value> --id <value> --kql <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--kql string Yes KQL query text to embed in the deeplink
--style enum No Link style: auto (default), fabric, adx
--query-uri string No Override the Kusto query URI

Examples

Terminal window
fabio kql-database deeplink --workspace $WS --id $KDB --kql "SensorEvents | where Temperature > 30 | take 100"

Read-only · Returns object

Print the remote MCP server URL for consuming this KQL database with AI agents

Terminal window
fabio kql-database mcp-url --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID

Read-only · Returns object

Retrieve KQL example pairs relevant to a natural-language prompt (via the eventhouse remote MCP server)

Terminal window
fabio kql-database examples --workspace <value> --id <value> --prompt <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--prompt string Yes Natural-language description of the query you want to author
--general-only bool No Only fetch general (public, curated) KQL examples
--specific-only bool No Only fetch database-specific (curated/learned) KQL examples

Read-only · Returns object

Retrieve relevant schema context (with column samples + stats) for a natural-language prompt (via the eventhouse remote MCP server)

Terminal window
fabio kql-database schema-context --workspace <value> --id <value> --prompt <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--prompt string Yes Natural-language description of the query you want to author

Read-only · Returns object

Show currently running queries on the KQL database

Terminal window
fabio kql-database queries-running --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--query-uri string No Override the Kusto query URI

Read-only · Returns object

Show the operations journal (completed operations history)

Terminal window
fabio kql-database journal --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--query-uri string No Override the Kusto query URI

Read-only · Returns object

Show recently completed queries

Terminal window
fabio kql-database queries-completed --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--query-uri string No Override the Kusto query URI

Read-only · Returns object

Get the definition of a KQL database (KQL script)

Terminal window
fabio kql-database get-definition --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--decode bool No Decode base64 payloads inline (adds decodedPayload field)

Read-only · Long-running operation · Returns object

Update the definition of a KQL database

Terminal window
fabio kql-database update-definition --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--file string No KQL script file path (reads file content)
--content string No KQL script content (inline)

Mutates state · Long-running operation · Returns void

List shortcuts in a KQL database

Terminal window
fabio kql-database list-shortcuts --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID

Read-only · Returns list

Create a table shortcut in a KQL database (OneLake/S3/ADLS Gen2/GCS/S3-compatible/Azure Blob)

Terminal window
fabio kql-database create-shortcut --workspace <value> --id <value> --name <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--name string Yes Shortcut name
--enable-query-acceleration bool No Enable query acceleration on the shortcut (required field; default false)
--target-type string No Target type (typed path): OneLake, AmazonS3, AdlsGen2, GoogleCloudStorage, S3Compatible, AzureBlobStorage. When set, the target is built from the typed flags below instead of --file/--content
--connection-id string No Connection ID for external (S3/ADLS/GCS/Blob) targets
--location string No Location URL for external targets (e.g. https://acct.dfs.core.windows.net/container)
--subpath string No Subpath under the location (optional)
--bucket string No Bucket name (S3Compatible only)
--target-workspace string No Target workspace ID (OneLake target)
--target-item string No Target item ID (OneLake target)
--target-path string No Target path within the target item (OneLake target, e.g. Tables/sales)
--target string No Raw target object as JSON (escape hatch; overrides typed target flags)
--file string No JSON file with the full shortcut body (escape hatch; must include target)
--content string No Inline JSON with the full shortcut body (escape hatch; must include target)

Mutates state · Returns object

Get a shortcut in a KQL database

Terminal window
fabio kql-database get-shortcut --workspace <value> --id <value> --shortcut-name <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--shortcut-name string Yes Shortcut name

Read-only · Returns object

Delete a shortcut in a KQL database

Terminal window
fabio kql-database delete-shortcut --workspace <value> --id <value> --shortcut-name <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--shortcut-name string Yes Shortcut name

Mutates state · Destructive · Returns void

Bulk-create multiple shortcuts (LRO)

Terminal window
fabio kql-database bulk-create-shortcuts --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes KQL database ID
--file string No Path to JSON file with array of shortcut requests
--content string No Inline JSON with array of shortcut requests
--conflict-policy string No Conflict policy: Abort, GenerateUniqueName, CreateOrOverwrite, OverwriteOnly

Mutates state · Long-running operation · Returns object