eventhouse-consumption-cli

Run read-only KQL queries against Microsoft Fabric Eventhouse via the Kusto REST API.

Updated Jul 14, 2026
One-click install
npx skills add https://github.com/9vantage/skills-for-fabric-clone --skill eventhouse-consumption-cli-9vantage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: eventhouse-consumption-cli
Source: https://github.com/9vantage/skills-for-fabric-clone/tree/main/plugins/fabric-skills/skills/eventhouse-consumption-cli
Command: npx skills add https://github.com/9vantage/skills-for-fabric-clone --skill eventhouse-consumption-cli-9vantage

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Querying Microsoft Fabric Eventhouse and KQL Databases from the command line requires correct cluster URI discovery, token audiences, and shell-safe handling of KQL pipe characters, which are common sources of failed requests and authentication errors. ## Core Features & Use Cases - KQL Query Execution via az rest: Run read-only KQL queries against the Kusto REST API using temp-file body patterns that avoid shell escaping issues with pipe characters. - Schema Discovery: Explore tables, columns, functions, materialized views, policies, external tables, and ingestion mappings with .show commands. - Monitoring and Diagnostics: Inspect active queries, recent commands, and ingestion failures to assess Eventhouse health. - Use Case: A data analyst connects to an Eventhouse, discovers the Orders table schema, samples rows, then runs a time-series aggregation with bin() and exports the results to JSON or CSV for reporting. ## Quick Start Ask the assistant to connect to your Fabric Eventhouse, list the tables in your KQL database, and run a KQL query summarizing events from the last hour.

Frequently Asked Questions about eventhouse-consumption-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a KQL query against Fabric Eventhouse from the command line?

Use az rest to POST to the cluster's /v1/rest/query endpoint with resource https://kusto.kusto.windows.net. Write the JSON body containing the database name and KQL query to a temp file and pass it with --body @file to avoid shell escaping issues with pipe characters.

How do I find the Eventhouse KQL database query URI?

Call the Fabric REST API to list kqlDatabases in your workspace with az rest, then read the queryServiceUri and databaseName from the item properties. Cluster URIs are per-item, so always resolve them dynamically rather than hardcoding.

Why does my KQL query fail in PowerShell or bash with az rest?

KQL queries contain pipe characters that break inline shell escaping in both bash and PowerShell. Write the JSON request body to a temp file and reference it with --body @file instead of inlining the query string.

Why does az rest return 401 or 403 when querying Eventhouse?

A 401 usually means the wrong token audience; use --resource https://kusto.kusto.windows.net for KQL queries and https://api.fabric.microsoft.com for control-plane calls. A 403 means you need the viewer role on the KQL Database.

Can this skill create tables or ingest data into Eventhouse?

No, this skill is strictly read-only and does not create, alter, or drop database objects. For authoring operations like table management, ingestion, and policies, use the eventhouse-authoring-cli skill instead.

How do I export KQL query results to CSV?

Run the query with az rest and save output with --output-file results.json, then pipe it through jq to map column names and rows into CSV format using the @csv filter.