Skip to content

rbutinar/ade-ops / .agents/skills/fabric-warehouse-test

fabric-warehouse-test

Verified

Read/Write Permission Test on a Fabric Warehouse

/fabric-warehouse-test — Read/Write Permission Test on a Fabric Warehouse

You are running a fixed set of 7 read/write probes against a Microsoft Fabric Warehouse schema to confirm deployment readiness (or diagnose a permissions issue).

Needs the same Fabric Warehouse SQL connector + MSAL cache as /fabric-sql-deploy — both shipped: core.connectors.fabric_warehouse + core.platforms.fabric.auth. Not relevant for today; kept for parity.

Prerequisites

  • ODBC Driver 17/18 for SQL Server
  • pyodbc, msal Python packages
  • Azure AD account that's expected to have at least Contributor on the schema

Usage

/fabric-warehouse-test {schema} --env {env}

Where schema defaults to automation and otherwise is a specific schema to probe.

The 7 Tests

  1. Schema exists — SELECT * FROM sys.schemas WHERE name = '{schema}'
  2. Read existing objects — count views + tables + procedures via INFORMATION_SCHEMA
  3. CREATE VIEW — CREATE VIEW {schema}.v_ade_access_test AS SELECT 1 AS ok, CURRENT_TIMESTAMP AS ts
  4. SELECT the test view
  5. CREATE TABLE — minimal Fabric-compatible CREATE TABLE (no PK/IDENTITY/FK)
  6. INSERT a couple of rows
  7. DROP test view + table (cleanup; runs in finally even on test failures)

All test objects use the ade_access_test prefix so they can't collide with real objects.

Behavior

Step 1: Resolve & Connect

Same as /fabric-sql-deploy.

Step 2: Run Tests in Order

Each test is try/except. Report PASS / FAIL per test with the error message on failure.

Step 3: Cleanup

Cleanup runs in a finally:

DROP VIEW IF EXISTS {schema}.v_ade_access_test;
DROP TABLE IF EXISTS {schema}.t_ade_access_test;

Step 4: Summary

=== FABRIC WAREHOUSE TEST — {env} / {schema} ===

✓ PASS  schema_exists
✓ PASS  read_objects
✓ PASS  create_view
✓ PASS  query_view
✓ PASS  create_table
✓ PASS  insert_data
✓ PASS  drop_objects

Result: 7/7 — ready for deploy.

On failures, surface the recommended action:

Failed testLikely causeRecommended action
schema_existsSchema not yet created/fabric-sql-deploy schema --env {env}
read_objectsViewer role missingAsk admin for Viewer + Contributor
create_view / create_tableContributor role missingAsk admin
insert_dataSame as create—

Step 5: Log

Read/write probe — only log on failure (success is the boring case):

{ISO_timestamp} | {role} | FABRIC-WH-TEST | {env} | {schema}: {n_failed} of 7 failed | fail

Notes

  • Token cached by MSAL (~1h validity, auto-refreshed).
  • Test objects use ade_access_test prefix — easy to identify and clean up if the run dies mid-way.
  • This skill is most useful when onboarding a new user to a workspace and you need to confirm their grants are right before they try a real deploy.
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall