sqldw-consumption-cli

Execute read-only T-SQL queries against Microsoft Fabric SQL endpoints via CLI.

Updated Jun 1, 2026
One-click install
npx skills add https://github.com/weiflycc-cmd/skills-for-fabric --skill sqldw-consumption-cli-weiflycc-cmd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sqldw-consumption-cli
Source: https://github.com/weiflycc-cmd/skills-for-fabric/tree/main/plugins/fabric-skills/skills/sqldw-consumption-cli
Command: npx skills add https://github.com/weiflycc-cmd/skills-for-fabric --skill sqldw-consumption-cli-weiflycc-cmd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates the need to write custom API code or use graphical tools to interact with Microsoft Fabric SQL workloads, enabling fast, scriptable access to data in Data Warehouses, Lakehouse SQL Endpoints, and Mirrored Databases directly from the command line.

Core Features & Use Cases

  • Read-Only T-SQL Querying: Run ad-hoc SELECT queries, count rows, filter and aggregate data across all supported Fabric SQL endpoints.
  • Schema and Metadata Discovery: Explore table schemas, columns, constraints, views, functions, and stored procedures to understand data structures without manual documentation.
  • Data Export and Performance Monitoring: Export query results to CSV or JSON formats, investigate slow queries, and monitor active SQL workloads for performance issues.
  • Use Case: A data analyst can use this Skill to quickly count rows in a lakehouse table, discover its column schema, and export filtered sales data to CSV for downstream reporting, all without leaving the CLI.

Quick Start

Use the sqldw-consumption-cli skill to count the number of rows in the 'Sales' table in your Fabric lakehouse and export the top 100 rows to a CSV file named sales_export.csv.

Frequently Asked Questions about sqldw-consumption-cli

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

FAQPage Schema
How do I query Microsoft Fabric SQL data from the command line?

Query Microsoft Fabric SQL data from the command line by executing read-only T-SQL queries against Data Warehouses and Lakehouse SQL Endpoints. This requires the Go-based sqlcmd utility with an active Azure CLI login session for Entra ID authentication.

Can I export T-SQL query results to CSV from a Fabric Data Warehouse?

Export T-SQL query results to CSV or JSON formats directly from a Fabric Data Warehouse using command-line execution. This allows you to script data extraction for filtered records and downstream reporting without needing graphical tools.

How do I discover table schemas and metadata in a Fabric Lakehouse SQL Endpoint?

Discover table schemas and metadata in a Fabric Lakehouse SQL Endpoint by running schema discovery queries via CLI. You can explore columns, constraints, views, functions, and stored procedures to understand data structures programmatically.

What are the prerequisites for running ad-hoc T-SQL queries against Fabric workloads?

Prerequisites for running ad-hoc T-SQL queries against Fabric workloads include the Go-based sqlcmd utility, an active Azure CLI login session, Entra ID authentication, and valid permissions to access the target Fabric workspace and SQL endpoint resources.

Does this approach support SQL performance monitoring for Fabric mirrored databases?

SQL performance monitoring for Fabric mirrored databases is supported through CLI execution. You can investigate slow queries and monitor active SQL workloads to identify performance issues across your Fabric environment using command-line tools.

Are there limitations when using CLI to query Fabric SQL endpoints?

Limitations when using CLI to query Fabric SQL endpoints include read-only access, restricting operations to SELECT queries, schema discovery, and data export. Modifications or write operations to the underlying Fabric data structures are not supported.