Azure Data Explorer queries telemetry, logs, metrics, and other structured data. Use it in Sim to inspect the database schema, run queries, ingest rows, and execute management commands.
Write queries with KQL (Kusto Query Language), a pipeline language that reads left to right. Start with a table, then pipe the rows through operators:
Azure Data Explorer also has a second command family: management commands, which all start with a dot (.show tables, .create table, .ingest inline). Queries read data; management commands inspect and change the cluster itself.
In Sim, this integration gives your agents both halves:
- Ask questions of your telemetry — turn a plain-English question into KQL, run it, and answer with real numbers instead of a guess
- Discover the data model first — list databases, tables, and stored functions, read a table's schema, and check its size and row count, so a generated query references columns that actually exist and you know what it will scan
- Push rows in — send small batches straight into a table, or materialize a query result into a rollup table with
.set-or-append - Manage tables — create a table from a column schema, or drop one you no longer need
- Debug the pipeline — list ingestion failures with their error codes and root causes, and check the state of a long-running operation
- Run any management command — the escape hatch for policies, mappings, and anything else on the control plane
Authentication uses a Microsoft Entra service principal (an app registration with a tenant ID, client ID, and client secret) rather than an interactive sign-in, so scheduled and unattended workflows keep working without anyone logging in. Grant that principal access to the database with .add database <DATABASE> viewers ('aadapp=<clientId>;<tenantId>') — use viewers for read-only agents, and ingestors or users only when a workflow needs to write.
A few things worth knowing before you build:
- Enable Read-only on the Run Query operation whenever an agent writes its own KQL. It sends the
x-ms-readonlyheader, and the cluster then refuses anything that would change data — a safeguard when generated KQL must only read data. - Results are capped at 10,000 rows. Every result reports
rowCount,totalRowCount, andtruncated, so a query that returned more than the cap says so rather than quietly looking complete. Aggregate withsummarizeor bound the query withtakeinstead of pulling raw rows. - Ingest Rows Inline is for small batches. It is ideal for tens or hundreds of rows from a workflow run. For continuous or high-volume loading, use Azure Data Explorer's queued or streaming ingestion instead.
- Ingest From Query defaults to
set-or-append, which adds to an existing table.set-or-replacediscards everything already in the target table — pick it only when you mean to rebuild the rollup from scratch. For a large backfill, turn on the background option and poll Show Operations with the operation ID it returns. - Ingest From Query matches columns by position, not by name. Kusto aligns the query result to the target table on column type and order, so a query that projects the right columns in the wrong order ingests data into the wrong columns without erroring. End the query with an explicit
projectin the table's column order, and confirm with Show Table Schema first. - Drop Table makes the table unavailable to queries. Recovery depends on the retention policy. A database admin can use
.undo drop tableonly while the underlying data remains recoverable. Useviewersfor workflows that only need to read.
Use the block
Run Kusto Query Language queries against Azure Data Explorer and Fabric Eventhouse clusters, discover databases, tables, and schemas, push small batches of rows inline, and run management commands. Authenticates with a Microsoft Entra service principal using client credentials, so no interactive sign-in is needed.
Actions
Azure Data Explorer Query
Run a Kusto Query Language (KQL) query against an Azure Data Explorer database and return the primary result table.
Azure Data Explorer Management Command
Run an Azure Data Explorer management command (a control command starting with ".") such as .show, .create, .alter, or .drop. Write commands can change data or configuration; use the Query operation for reads.
Azure Data Explorer List Databases
List the databases on an Azure Data Explorer cluster that the service principal can access.
Azure Data Explorer List Tables
List the tables in an Azure Data Explorer database, with their folder and docstring.
Azure Data Explorer Show Table Schema
Read the column schema of an Azure Data Explorer table in CSL form (e.g., "Timestamp:datetime,Level:string"). Use this before writing a KQL query against an unfamiliar table.
Azure Data Explorer Show Database Schema
Read the full schema of an Azure Data Explorer database as a flat list of every table and column, so an agent can discover the data model in one call.
Azure Data Explorer Show Table Details
Read size, row count, hot-cache footprint, and effective policies for a table — or for every table in the database when no table is given. Use it to see how much data a table actually holds before querying it.
Azure Data Explorer List Functions
List the stored functions in an Azure Data Explorer database, with their parameters and bodies, so an agent can reuse existing logic instead of rewriting it.
Azure Data Explorer Ingest Inline
Push rows directly into an Azure Data Explorer table with .ingest inline. Data is parsed as CSV against the table schema unless an ingestion property says otherwise. Intended for small batches — use queued or streaming ingestion for production volumes.
Azure Data Explorer Ingest From Query
Materialize the result of a KQL query into a table with .set, .append, .set-or-append, or .set-or-replace. Use this to build rollup or summary tables instead of pushing rows from a workflow. Kusto matches the query result to the target table by column type and position, NOT by column name, so project the columns in exactly the table's order or the data lands in the wrong columns.
Azure Data Explorer Create Table
Create a table in an Azure Data Explorer database from a CSL column schema. Succeeds without changing anything if a table of the same name already exists.
Azure Data Explorer Drop Table
Drop a table from an Azure Data Explorer database. The table becomes unavailable to queries; data recovery depends on the retention policy. Returns the tables that remain.
Azure Data Explorer Show Ingestion Failures
List ingestion failures recorded for a database, with the failing table, error code, root cause detail, and whether the failure is permanent or transient. Failures are retained for 14 days.
Azure Data Explorer Show Operations
Check the state of administrative operations on a cluster, such as an async ingestion. Given an operation ID it returns that operation latest update; with no ID it returns the operations from the last two weeks.