From fabric-dataflow-migration-toolkit
Query Fabric lakehouse SQL analytics endpoints with read-only access. Validate data after notebook execution, inspect table schemas, run row count checks, and export results to CSV. Use when validating pipeline output, debugging data issues, or exporting query results from Fabric lakehouses. Requires ODBC Driver 18 and Azure authentication.
How this skill is triggered — by the user, by Claude, or both
Slash command
/fabric-dataflow-migration-toolkit:fabric-lakehouse-readerThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Query Fabric lakehouse SQL analytics endpoints to inspect metadata and validate data for pipeline development.
Query Fabric lakehouse SQL analytics endpoints to inspect metadata and validate data for pipeline development.
This skill provides read-only access to Fabric lakehouse tables via the SQL analytics endpoint, enabling agents to:
All query results are automatically saved to 7 - Data Exports/ as CSV files.
This is the Fabric equivalent of the sql-server-reader skill.
xxx.datawarehouse.fabric.microsoft.com)lh_bronze)az login or service principalpip install pyodbc pandas azure-identity
Windows users: Download from Microsoft ODBC Driver
Verify driver:
python -c "import pyodbc; print([d for d in pyodbc.drivers() if '18' in d])"
# Interactive login (development)
az login
# Or install Azure CLI: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli
The skill is invoked through the Python script located in scripts/query_fabric_lakehouse.py.
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --test-connection --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --list-tables --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze
Output: Displays table names and saves list to 7 - Data Exports/table_list.csv
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --schema bronze_customers --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze
Output:
7 - Data Exports/schema_bronze_customers.csvpython "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --query "SELECT COUNT(*) as row_count FROM bronze_customers" --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze
Output:
7 - Data Exports/query_results_TIMESTAMP.csvpython "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --query-file path/to/query.sql --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --export bronze_customers --limit 1000 --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze
Output: Full table export to 7 - Data Exports/bronze_customers_TIMESTAMP.csv
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --query "SELECT * FROM bronze_customers" --limit 100 --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze
az login
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --list-tables --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze
Uses DefaultAzureCredential which tries (in order):
az login)Set environment variables:
FABRIC_TENANT_ID=your-tenant-id
FABRIC_CLIENT_ID=your-client-id
FABRIC_CLIENT_SECRET=your-client-secret
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --list-tables --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze --auth-method service_principal
Or pass credentials directly:
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --list-tables --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze --auth-method service_principal --tenant-id <id> --client-id <id> --client-secret <secret>
# After running bronze notebook, validate the load
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --query "
SELECT
COUNT(*) as total_rows,
COUNT(DISTINCT _load_id) as load_batches,
MIN(_load_timestamp) as earliest_load,
MAX(_load_timestamp) as latest_load
FROM bronze_customers
" --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --query "
SELECT 'bronze_customers' as table_name, COUNT(*) as rows FROM bronze_customers
UNION ALL
SELECT 'bronze_orders', COUNT(*) FROM bronze_orders
UNION ALL
SELECT 'bronze_products', COUNT(*) FROM bronze_products
" --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --query "
SELECT
COUNT(*) as total_rows,
COUNT(CASE WHEN customer_id IS NULL THEN 1 END) as null_customer_ids,
COUNT(CASE WHEN email IS NULL THEN 1 END) as null_emails,
COUNT(CASE WHEN created_date IS NULL THEN 1 END) as null_dates
FROM bronze_customers
" --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze
# Bronze count
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --query "SELECT COUNT(*) as bronze_rows FROM bronze_customers" --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze
# Silver count
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --query "SELECT COUNT(*) as silver_rows FROM silver_customers" --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_silver
The script validates queries before execution:
The Fabric SQL analytics endpoint supports a T-SQL subset:
All exports are saved to:
7 - Data Exports/
├── table_list.csv
├── schema_bronze_customers.csv
├── query_results_20260209_143022.csv
├── bronze_customers_20260209_143045.csv
└── ...
File naming convention:
table_list.csvschema_{TABLE_NAME}.csvquery_results_{TIMESTAMP}.csv{TABLE_NAME}_{TIMESTAMP}.csvThe script provides clear error messages for:
Example errors:
ERROR: Connection failed - authentication required
Run: az login
Then retry the command.
ERROR: Invalid query - write operations not permitted
Query contained: INSERT INTO
Only SELECT statements are allowed.
ERROR: ODBC Driver 18 for SQL Server not found
Install from: https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server
Validate pipeline output after notebook execution:
# Check row counts across all layers
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --query "SELECT COUNT(*) FROM bronze_customers" --endpoint ... --database lh_bronze
# Inspect schemas
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --schema bronze_customers --endpoint ... --database lh_bronze
Explore data during discovery:
# What tables exist?
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --list-tables --endpoint ... --database lh_bronze
# Sample data
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --query "SELECT TOP 10 * FROM bronze_customers" --endpoint ... --database lh_bronze
Validate bronze load results:
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --query "
SELECT COUNT(*) as rows, COUNT(DISTINCT _load_id) as loads FROM bronze_customers
" --endpoint ... --database lh_bronze
The script searches for project-config.yml in the current directory and parent directories. If found, it reads sql_endpoint and database fields to use as defaults:
# project-config.yml
workspace_name: "MyWorkspace"
sql_endpoint: "xxx.datawarehouse.fabric.microsoft.com"
bronze_lakehouse: "lh_bronze"
silver_lakehouse: "lh_silver"
gold_lakehouse: "lh_gold"
When auto-discovered, you can omit --endpoint and --database:
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --list-tables
FABRIC_SQL_ENDPOINT=xxx.datawarehouse.fabric.microsoft.com
FABRIC_DATABASE=lh_bronze
FABRIC_TENANT_ID=your-tenant-id
FABRIC_CLIENT_ID=your-client-id
FABRIC_CLIENT_SECRET=your-client-secret
All connection details can be passed as arguments:
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" \
--endpoint xxx.datawarehouse.fabric.microsoft.com \
--database lh_bronze \
--auth-method azure_cli \
--query "SELECT * FROM bronze_customers"
# Test connection
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --test-connection --endpoint ... --database ...
# Verify Azure authentication
az account show
az login is current (tokens expire)# Check installed drivers
python -c "import pyodbc; print(pyodbc.drivers())"
# Install ODBC Driver 18 for SQL Server
# https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server
# List all available tables
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --list-tables --endpoint ... --database ...
# Note: Delta tables may take a moment to appear in SQL endpoint after creation
--limit for exploratory queries on large tablesSELECT * on wide tables - specify columnsaz login for development, service principal for CI/CD.gitignore already excludes .env files--output--limit 10 for quick validation--verbose to debug connection issues# 1. List all tables
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --list-tables --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze
# 2. Inspect bronze table structure
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --schema bronze_customers --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze
# 3. Export sample data
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --export bronze_customers --limit 1000 --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze
# 4. Check data quality
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --query "
SELECT
COUNT(*) as total_rows,
COUNT(DISTINCT customer_id) as unique_customers,
COUNT(CASE WHEN email IS NULL THEN 1 END) as null_emails,
MIN(_load_timestamp) as earliest_load,
MAX(_load_timestamp) as latest_load
FROM bronze_customers
" --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze
# 5. Find specific issues
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --query "SELECT * FROM bronze_customers WHERE email IS NULL" --output customers_missing_email.csv --endpoint xxx.datawarehouse.fabric.microsoft.com --database lh_bronze
# List tables
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --list-tables --endpoint EP --database DB
# Get schema
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --schema TABLE_NAME --endpoint EP --database DB
# Sample data
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --query "SELECT TOP 10 * FROM TABLE_NAME" --endpoint EP --database DB
# Export full table
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --export TABLE_NAME --endpoint EP --database DB
# Custom query
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --query "YOUR_SELECT_QUERY" --endpoint EP --database DB
# Query from file
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --query-file path/to/query.sql --endpoint EP --database DB
# Test connection
python "${CLAUDE_PLUGIN_ROOT}/skills/fabric-lakehouse-reader/scripts/query_fabric_lakehouse.py" --test-connection --endpoint EP --database DB
npx claudepluginhub kavasimihaly/ai-plugins --plugin fabric-dataflow-migration-toolkitProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Searches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.