
Eventhouse Authoring Cli
Bootstrap Microsoft Fabric Eventhouse tables, CSV mappings, and blob ingest scripts without hand-writing every az rest KQL payload.
Overview
Eventhouse Authoring CLI is an agent skill for the Build phase that ships Bash and PowerShell templates to create Eventhouse tables, CSV mappings, and blob ingest via az rest.
Install
npx skills add https://github.com/microsoft/skills-for-fabric --skill eventhouse-authoring-cliWhat is this skill?
- Reusable Bash and PowerShell templates for Eventhouse via az rest
- Helper pattern posts JSON to /v1/rest/mgmt and parses jq row output
- Create-merge table DDL with typed columns (datetime, string, dynamic, real)
- Create-or-alter CSV ingestion mapping with ordinal column definitions
- Optional .ingest from blob URI with format, mapping reference, and ignoreFirstRecord
- Templates cover create-merge table, CSV mapping, and optional blob ingest in one script flow
Adoption & trust: 52 installs on skills.sh; 427 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need Eventhouse tables and ingestion wired on Fabric but keep re-deriving az rest payloads and KQL management commands from scratch.
Who is it for?
Solo builders scripting Fabric Eventhouse bootstrap on a cluster URI and database they already control with Azure CLI logged in.
Skip if: Teams wanting Terraform/Bicep-first provisioning, interactive KQL analytics authoring, or non-Azure data stores.
When should I use this skill?
You need reusable Bash or PowerShell to author Eventhouse tables and ingest via az rest against a cluster URI and database.
What do I get? / Deliverables
You get runnable scripts that create-merge schemas, define CSV mappings, and optionally ingest from blob so your agent or pipeline can repeat the same Eventhouse setup.
- Parameterized Bash or PowerShell script invoking az rest mgmt
- Table DDL and CSV ingestion mapping applied to the target database
- Optional completed .ingest from blob when BLOB_URI is provided
Recommended Skills
Journey fit
Eventhouse authoring is integration work you do while building analytics backends on Azure Fabric, before production telemetry flows. Scripts call az rest against Kusto management endpoints—classic cloud data-plane integration, not app UI or generic PM.
How it compares
Template scripts for az rest management calls—not a Fabric MCP server or portal-only workflow.
Common Questions / FAQ
Who is eventhouse-authoring-cli for?
Indie builders and small data teams on Microsoft Fabric who automate Eventhouse table creation and CSV ingest with Azure CLI.
When should I use eventhouse-authoring-cli?
During Build integrations when you stand up telemetry or analytics tables, and during Operate infra when you rerun ingest templates after schema tweaks.
Is eventhouse-authoring-cli safe to install?
Review the Security Audits panel on this Prism page and treat scripts as production-touching—they POST management commands and can ingest external blobs under your Azure identity.
SKILL.md
READMESKILL.md - Eventhouse Authoring Cli
# Eventhouse Authoring Script Templates Reusable Bash and PowerShell templates for common Eventhouse authoring operations via `az rest`. --- ## Bash Templates ### Create Table and Ingest from Blob ```bash #!/bin/bash set -euo pipefail CLUSTER_URI="${1:?Usage: $0 <cluster_uri> <database>}" DB="${2:?Usage: $0 <cluster_uri> <database>}" run_mgmt() { cat > /tmp/kql_body.json << EOF {"db":"${DB}","csl":"$1"} EOF az rest --method POST \ --url "${CLUSTER_URI}/v1/rest/mgmt" \ --resource "https://kusto.kusto.windows.net" \ --headers "Content-Type=application/json" \ --body @/tmp/kql_body.json \ | jq '.Tables[0].Rows' } echo "=== Creating table ===" run_mgmt ".create-merge table Events (Timestamp: datetime, EventType: string, UserId: string, Properties: dynamic, Duration: real)" echo "=== Creating CSV mapping ===" run_mgmt ".create-or-alter table Events ingestion csv mapping 'EventsCsvMapping' '[{\"column\":\"Timestamp\",\"datatype\":\"datetime\",\"ordinal\":0},{\"column\":\"EventType\",\"datatype\":\"string\",\"ordinal\":1},{\"column\":\"UserId\",\"datatype\":\"string\",\"ordinal\":2},{\"column\":\"Properties\",\"datatype\":\"dynamic\",\"ordinal\":3},{\"column\":\"Duration\",\"datatype\":\"real\",\"ordinal\":4}]'" echo "=== Ingesting data ===" BLOB_URI="${3:-}" if [ -n "${BLOB_URI}" ]; then run_mgmt ".ingest into table Events (h'${BLOB_URI};impersonate') with (format='csv', ingestionMappingReference='EventsCsvMapping', ignoreFirstRecord=true)" echo "Ingestion command submitted." else echo "No blob URI provided — skipping ingestion." fi echo "=== Verifying ===" cat > /tmp/kql_body.json << EOF {"db":"${DB}","csl":"Events | count"} EOF az rest --method POST \ --url "${CLUSTER_URI}/v1/rest/query" \ --resource "https://kusto.kusto.windows.net" \ --headers "Content-Type=application/json" \ --body @/tmp/kql_body.json \ | jq '.Tables[0].Rows' echo "Done." ``` --- ### Schema Deployment (Idempotent) ```bash #!/bin/bash set -euo pipefail CLUSTER_URI="${1:?Usage: $0 <cluster_uri> <database> <schema_file>}" DB="${2:?}" SCHEMA_FILE="${3:?}" echo "=== Deploying schema from ${SCHEMA_FILE} ===" while IFS= read -r cmd; do [[ "$cmd" =~ ^// ]] && continue # skip comment lines [[ -z "$cmd" ]] && continue # skip blank lines cat > /tmp/kql_body.json << EOF {"db":"${DB}","csl":"${cmd}"} EOF az rest --method POST \ --url "${CLUSTER_URI}/v1/rest/mgmt" \ --resource "https://kusto.kusto.windows.net" \ --headers "Content-Type=application/json" \ --body @/tmp/kql_body.json \ | jq '.Tables[0].Rows' done < "${SCHEMA_FILE}" echo "=== Verifying deployment ===" cat > /tmp/kql_body.json << EOF {"db":"${DB}","csl":".show tables details | project TableName, TotalRowCount"} EOF az rest --method POST \ --url "${CLUSTER_URI}/v1/rest/query" \ --resource "https://kusto.kusto.windows.net" \ --headers "Content-Type=application/json" \ --body @/tmp/kql_body.json \ | jq '.Tables[0].Rows' cat > /tmp/kql_body.json << EOF {"db":"${DB}","csl":".show functions | project Name, Folder"} EOF az rest --method POST \ --url "${CLUSTER_URI}/v1/rest/query" \ --resource "https://kusto.kusto.windows.net" \ --headers "Content-Type=application/json" \ --body @/tmp/kql_body.json \ | jq '.Tables[0].Rows' cat > /tmp/kql_body.json << EOF {"db":"${DB}","csl":".show materialized-views | project Name, IsEnabled, IsHealthy"} EOF az rest --method POST \ --url "${CLUSTER_URI}/v1/rest/query" \ --resource "https://kusto.kusto.windows.net" \ --headers "Content-Type=application/json" \ --body @/tmp/kql_body.json \ | jq '.Tables[0].Rows' echo "Schema deployment complete." ``` --- ### Export Schema to File ```bash #!/bin/bash set -euo pipefail CLUSTER_URI="${1:?Usage: $0 <cluster_uri> <database> [output_file]}" DB="${2:?}" OUTPUT="${3:-schema_export_$(date +%Y%m%d).kql}" echo "=== Exporting schema for ${DB} ===" cat > /tmp/kql_body.json << EOF {"db":"${DB}","csl":".show database