sqldw-authoring-cli

Execute T-SQL DDL, DML, and data ingestion against Microsoft Fabric warehouses from CLI environments.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Authoring Microsoft Fabric Data Warehouse objects from terminal-based AI agents requires knowing the correct sqlcmd invocation patterns, Entra-only authentication, endpoint discovery via REST, and Fabric-specific T-SQL limitations (no ALTER COLUMN, snapshot isolation conflicts, read-only Lakehouse SQL endpoints). This Skill encodes those rules and ready-to-run templates so agents can safely create tables, load data, and manage schema changes without trial-and-error. ## Core Features & Use Cases - CLI Authoring Patterns: sqlcmd (Go) one-liners and input-file workflows for CREATE/ALTER/DROP tables, CTAS, INSERT/UPDATE/DELETE/MERGE, and COPY INTO ingestion from ADLS. - Advanced Operations: Transactions with TRY/CATCH, schema evolution via CTAS workaround, stored procedures, time travel queries, and warehouse snapshots. - Script Generation: Reusable Bash and PowerShell templates for ELT pipelines, incremental upserts with retry logic, schema migration, and data recovery. - Use Case: An agent asked to "load parquet files from ADLS into the warehouse and upsert into FactSales" discovers the endpoint via az rest, runs COPY INTO, then executes a DELETE + INSERT transaction with retry handling. ## Quick Start Ask the agent to create a table and load data into your Fabric warehouse using T-SQL from the terminal, providing your workspace and warehouse names.

Frequently Asked Questions about sqldw-authoring-cli

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

FAQPage Schema
How do I run T-SQL against a Microsoft Fabric warehouse from the command line?▼

Use the Go version of sqlcmd with the -G flag for Entra ID authentication: sqlcmd -S <endpoint>.datawarehouse.fabric.microsoft.com -d <DatabaseName> -G -Q "your query". Discover the endpoint FQDN via the Fabric REST API using az rest, and run az login first.

How to load data into Fabric warehouse with COPY INTO?▼

Run COPY INTO via sqlcmd pointing to your ADLS Gen2 path, for example COPY INTO dbo.FactSales FROM 'https://storageacct.dfs.core.windows.net/container/sales/*.parquet' WITH (FILE_TYPE = 'PARQUET'). The caller needs Storage Blob Data Reader on the storage account, or a SAS token in CREDENTIAL.

Can I run DML or DDL on a Lakehouse SQL endpoint in Fabric?▼

No. Lakehouse and Mirrored DB SQL endpoints are read-only for table data; INSERT, UPDATE, DELETE, and table DDL are not supported. You can only create views, functions, and stored procedures there. Full authoring requires a Warehouse item.

Why does ALTER COLUMN fail in Microsoft Fabric Data Warehouse?▼

ALTER COLUMN is not supported in Fabric Data Warehouse. Use the CTAS workaround: create a new table with the desired type via CREATE TABLE AS SELECT with explicit CAST, drop the original, rename with sp_rename, then re-apply constraints and GRANT/DENY permissions.

Why am I getting snapshot isolation conflict errors 24556 or 24706?▼

Fabric warehouses use snapshot isolation with table-level write-write conflict detection, so concurrent UPDATE or DELETE on the same table fails. Serialize writes to the same table and retry with backoff; keep transactions short to reduce the conflict window.

Should I use MERGE for upserts in Fabric Data Warehouse?▼

MERGE is in preview and uses table-level conflict detection, so it is not recommended for production. Use DELETE + INSERT inside a transaction instead, which the provided upsert templates implement with retry logic.