kql-database
Manage KQL databases (within eventhouses)
Authentication scope: fabric
List KQL databases in a workspace
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
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
Section titled “create”Create a new KQL database
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
fabio kql-database create --workspace $WS --name "SensorDB" --eventhouse-id $EHMutates state · Returns object
update
Section titled “update”Update KQL database properties (name and/or description)
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
Section titled “delete”Delete a KQL database
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
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
fabio kql-database query --workspace $WS --id $KDB --kql ".create table SensorEvents (DeviceId: string, Temperature: real, Timestamp: datetime)"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
Section titled “list-entities”List entities (tables, materialized views, external tables, functions) in a database
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
fabio kql-database list-entities --workspace $WS --id $KDBfabio kql-database list-entities --workspace $WS --id $KDB --entity-type tableRead-only · Returns list
describe
Section titled “describe”Get schema for all entities in a database
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
fabio kql-database describe --workspace $WS --id $KDBRead-only · Returns list
describe-entity
Section titled “describe-entity”Get detailed schema for a specific entity (table, view, function)
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
fabio kql-database describe-entity --workspace $WS --id $KDB --entity-name SensorEventsRead-only · Returns object
sample
Section titled “sample”Sample rows from a table, materialized view, external table, or function
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
fabio kql-database sample --workspace $WS --id $KDB --entity-name SensorEvents --count 5Read-only · Returns list
ingest
Section titled “ingest”Ingest data into a KQL table — inline (small) or from OneLake/blob storage (large files)
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
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-queryplan
Section titled “show-queryplan”Show execution plan for a KQL query without running it
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
fabio kql-database show-queryplan --workspace $WS --id $KDB --kql "SensorEvents | summarize avg(Temperature) by bin(Timestamp, 1h)"Read-only · Returns list
diagnostics
Section titled “diagnostics”Run cluster diagnostics (capacity, health, ingestion failures)
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
fabio kql-database diagnostics --workspace $WS --id $KDBRead-only · Returns object
deeplink
Section titled “deeplink”Generate a deeplink URL for a KQL query in Fabric portal or ADX Web Explorer
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
fabio kql-database deeplink --workspace $WS --id $KDB --kql "SensorEvents | where Temperature > 30 | take 100"Read-only · Returns object
mcp-url
Section titled “mcp-url”Print the remote MCP server URL for consuming this KQL database with AI agents
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
examples
Section titled “examples”Retrieve KQL example pairs relevant to a natural-language prompt (via the eventhouse remote MCP server)
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
schema-context
Section titled “schema-context”Retrieve relevant schema context (with column samples + stats) for a natural-language prompt (via the eventhouse remote MCP server)
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
queries-running
Section titled “queries-running”Show currently running queries on the KQL database
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
journal
Section titled “journal”Show the operations journal (completed operations history)
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
queries-completed
Section titled “queries-completed”Show recently completed queries
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-definition
Section titled “get-definition”Get the definition of a KQL database (KQL script)
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-definition
Section titled “update-definition”Update the definition of a KQL database
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
Section titled “list-shortcuts”List shortcuts in a KQL database
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-shortcut
Section titled “create-shortcut”Create a table shortcut in a KQL database (OneLake/S3/ADLS Gen2/GCS/S3-compatible/Azure Blob)
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-shortcut
Section titled “get-shortcut”Get a shortcut in a KQL database
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-shortcut
Section titled “delete-shortcut”Delete a shortcut in a KQL database
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-shortcuts
Section titled “bulk-create-shortcuts”Bulk-create multiple shortcuts (LRO)
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
