By sdebruyn
Analyze and optimize Fabric Data Warehouse query performance by capturing execution plans, inspecting statistics, and producing prioritized tuning recommendations. Also scaffolds a complete dbt-fabric project with profiles, sources, and requirements.
Scaffolds a complete dbt-fabric project for a Fabric Data Warehouse: generates profiles.yml, dbt_project.yml, a column-rich _sources.yml (with data types for every table column, ready for dbt contracts), requirements.txt, and .gitignore, then writes them to the local filesystem. Use when the user asks to "set up dbt", "scaffold a dbt project", "create dbt profile", "initialize dbt for my warehouse", "generate dbt sources", or "bootstrap dbt-fabric".
Analyzes query performance on a Fabric Data Warehouse: captures the estimated execution plan, inspects query insights history, identifies costly operators and missing or stale statistics, inspects data-clustering columns, and proposes or applies optimizations. Use when the user asks to "optimize a query", "why is my query slow", "check query performance", "analyze execution plan", "missing statistics", "fix clustering", "re-cluster table", or any variant of diagnosing slow Fabric DW SQL.
Investigates the performance of an ENTIRE Fabric Data Warehouse (warehouse-wide, not a single query): surfaces long-running and frequent queries, reads SQL pool resource-pressure insights, audits statistics health, checks result-set caching, reviews and tunes SQL pool configuration, and produces a prioritized findings + recommendations report. Use when the user asks to "investigate warehouse performance", "why is my warehouse slow", "tune sql pools", "find expensive queries", "find the most frequent queries", "check sql pool pressure", or "enable result set caching". For diagnosing or rewriting ONE specific query (execution plan, missing statistics on its tables, clustering), use /query-optimizer instead.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Python CLI and MCP server for Microsoft Fabric Data Warehouses and SQL Analytics Endpoints: administer, query, optimize, and secure them from your terminal or your AI agent.
Full documentation: fdw.debruyn.dev
📣 Just announced! Read the story behind fabric-dw in the announcement blog post.
fabric-dw provides two interfaces for managing Microsoft Fabric Data Warehouses and SQL Analytics Endpoints:
Authentication is configured via the FABRIC_AUTH environment variable. The default (FABRIC_AUTH=default) uses azure-identity DefaultAzureCredential, which walks environment variables, Workload/Managed Identity, Azure CLI, Azure Developer CLI, Azure PowerShell, and interactive browser in order. Any of these will satisfy it. See the Authentication docs for the full chain, all supported sources, and debugging tips.
pip install fabric-dw
# or run without installing:
uvx fabric-dw --help
# or install persistently on PATH:
uv tool install fabric-dw
After installation, the fdw command is a short alias for fabric-dw; both invoke the same entry point. See the Install docs for MCP server setup, upgrading, and prerelease builds.
The workspace is a global root option -w / --workspace placed before the command group. Set a default once with fdw config set workspace <NAME> and omit -w on every subsequent call. Workspace resolution order: (1) -w flag, (2) FABRIC_DW_DEFAULT_WORKSPACE env var, (3) configured default.
# Run without installing; install to get the fdw alias
uvx fabric-dw --help
# Set a default workspace once; all subsequent commands pick it up
fdw config set workspace SalesWS
# -- Run and explain SQL --
# Execute a query against a warehouse
fdw sql exec SalesWH -q "SELECT TOP 10 * FROM dbo.orders ORDER BY order_date DESC"
# Capture an estimated execution plan as SVG -- no SSMS or Windows needed
fdw sql plan SalesWH -f query.sql --format svg -o plan.svg
# -- Performance mission-control --
# See what is running right now
fdw queries running SalesWH
# Long-running queries from the past hour
fdw queries long-running SalesWH --ago 1h
# Kill a runaway session by ID
fdw queries kill SalesWH 55
# Most-repeated queries over the past 24 hours
fdw queries frequent SalesWH --ago 24h
# -- Optimize --
# Inspect a statistics histogram with inline terminal bar charts
fdw statistics show SalesWH dbo.orders st_order_date --histogram
# Re-cluster a table on a new key (transactional CTAS-swap, auto-rollback on failure)
fdw tables cluster-by SalesWH dbo.orders --cluster-by customer_id
# -- Time travel + export --
# Browse the table as it looked 2 hours ago
fdw tables read SalesWH dbo.orders --ago 2h
# Export a point-in-time snapshot to Parquet
fdw tables export SalesWH dbo.orders --output snapshot.parquet --ago 2h
# -- Governance --
# Grant SELECT on a specific table
fdw permissions sql grant SalesWH SELECT --to [email protected] --object dbo.orders
# Deny access to sensitive columns (column-level security)
fdw permissions cls deny SalesWH SELECT --to [email protected] \
--object dbo.orders --columns salary,bonus
npx claudepluginhub sdebruyn/fabric-dw-mcp-cli --plugin fabric-dwAgent skills for Fabric Data Warehouse: query performance analysis, warehouse-wide performance investigation and tuning, and dbt project bootstrap.
Give your AI a memory — mine projects and conversations into a searchable palace. 35 MCP tools, auto-save hooks, and guided setup.
MCP server that saves 98% of your context window with session continuity. Sandboxed code execution in 11 languages, FTS5 knowledge base with BM25 ranking, and automatic state restore across compactions.
Write SQL, explore datasets, and generate insights faster. Build visualizations and dashboards, and turn raw data into clear stories for stakeholders.
Open-source, local-first Claude Code plugin for token reduction, context compression, and cost optimization using hybrid RAG retrieval (BM25 + vector search), reranking, AST-aware chunking, and compact context packets.
Agent Skills for AI/ML tasks including dataset creation, model training, evaluation, and research paper publishing on Hugging Face Hub
Intelligent draw.io diagramming plugin with AI-powered diagram generation, multi-platform embedding (GitHub, Confluence, Azure DevOps, Notion, Teams, Harness), conditional formatting, live data binding, and MCP server integration for programmatic diagram creation and management.