# Sqldw CLI

Manage Fabric Warehouse, Lakehouse SQL endpoints, and Mirrored Databases: DDL/DML, COPY...

- Repository: https://github.com/microsoft/skills-for-fabric (1306 stars)
- Category: Data and ML
- License: MIT
- Last updated: 2026-10-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add microsoft/skills-for-fabric --skill sqldw-cli -g -a claude-code -y`
Codex: `npx skills add microsoft/skills-for-fabric --skill sqldw-cli -g -a codex -y`
Cursor: `npx skills add microsoft/skills-for-fabric --skill sqldw-cli -g -a cursor -y`
Gemini CLI: `npx skills add microsoft/skills-for-fabric --skill sqldw-cli -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add microsoft/skills-for-fabric`

## Description

Manage Fabric Warehouse, Lakehouse SQL endpoints, and Mirrored Databases: DDL/DML, COPY INTO, read-only T-SQL, Query Insights diagnostics, and Capacity Metrics CU-spike correlation. Synapse migration target SQL belongs to synapse-migration; Fabric SQL database belongs to sqldb-cli. Triggers: query warehouse, create warehouse table, failed or canceled query, CU spike, Capacity Metrics app, custom SQL pool, Lakehouse table health.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

> **Telemetry, MANDATORY.** Every `api.fabric.microsoft.com` call must carry
> `x-ms-fabric-skill: sqldw-cli` (`az rest`: `--headers "x-ms-fabric-skill=sqldw-cli"`),
> including every LRO poll, `fabric_lro` and retry. Snippets omit it, add it anyway.
> This covers all three modes; the mode references inherit it.

> **CRITICAL NOTES**
> 1. To find the workspace details (including its ID) from workspace name: list all workspaces and, then, use JMESPath filtering
> 2. To find the item details (including its ID) from workspace ID, item type, and item name: list all items of that type in that workspace and, then, use JMESPath filtering
> 3. **Skill disambiguation**: use `sqldw-cli` for T-SQL sent to a Warehouse, a Lakehouse SQL analytics endpoint, or a Mirrored Database, including plain Lakehouse table SELECT, row-count, filtering, and aggregation requests. Target Warehouse SQL executed within an end-to-end Azure Synapse or Dedicated SQL Pool migration belongs to `synapse-migration`; standalone Warehouse work before or after migration returns to `sqldw-cli`. Any notebook-cell or PySpark DataFrame work is `spark-cli`; a Fabric SQL database (OLTP) is `sqldb-cli`.

# Fabric Warehouse and SQL Endpoints, CLI Skill

This one skill owns Fabric Warehouse, Lakehouse SQL analytics endpoints and Mirrored Databases: T-SQL authoring and ingestion, read-only querying, and warehouse performance diagnostics.

It is a **mode dispatcher** and contains NO procedures. Pick the mode that matches the request from the table below, then **read the matching `references/<mode>.md` file end to end with your file-reading tool BEFORE issuing a single command**. That file holds the T-SQL surface area, DDL constraints, query templates and gotchas; acting without it produces invalid T-SQL and wrong results.

## Mode selection

The rest: https://github.com/microsoft/skills-for-fabric/blob/HEAD/plugins/fabric-skills/skills/sqldw-cli/SKILL.md
