dbt schema.yml with source tests
dbt_schemaWrites a dbt sources file: unique and not_null on key columns, relationships tests on single-column relationships, composite ones as comments. project=true: a dbt project draft for dbt-fabric 1.12 on dbt-core 1.12 (Fabric Warehouse T-SQL): typed, de-duplicated staging models; marts per domain joined only over relationships check_rows counted many-to-one, child facts summed before the join; untemplated parts and TODOs listed. quality: the same checks as Great Expectations and/or Soda drafts; profile: a Fabric profiles.yml. Can sit beside dbt Labs' dbt-mcp, which runs dbt. Requires workspace and source. Returns YAML text, or JSON files for a project. Read-only (check_rows counts rows); creates nothing, runs no dbt. Errors: {error, kind, hint}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspace": "<workspace>",
"source": "<source>"
},
"name": "dbt_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | No | Primary keys replacing the inferred ones. Default: inferred. Example: {"order_items": ["order_id", "line_no"]}. | |
| fixes | No | Ids from validate_plan(fixes=true). | |
| schema | No | Schema in the source. Default "dbo". | dbo |
| source | Yes | Lakehouse, warehouse or SQL database, name or id. | |
| tables | No | Table names or globs to show. Default all. Example: ["sales_*"]. | |
| profile | No | With project=true: adds a profiles.yml for Fabric with placeholders and no secret. Default false. | |
| project | No | true: a whole dbt project as files (staging, marts per domain) instead of the sources file. Default false. Example: true. | |
| quality | No | Also drafts the same key and relationship checks as a Great Expectations suite per table ("gx"), as SodaCL checks ("soda") or both ("both"), each with its rule and counts. Default none. | |
| confirmed | No | Relationships the user confirmed, added to the plan. Default none. Example: [{"source": "orders", "source_cols": ["ship_to_id"], "target": "addresses", "target_cols": ["address_id"]}]. | |
| workspace | Yes | Fabric workspace, name or id. | |
| check_rows | No | true: with row counts. Default false. | |
| source_name | No | Name of the dbt source. Default: the schema name. Example: "shop". | |
| arguments_block | No | true (default) puts test arguments under arguments: (dbt 1.10.5+); false writes them top-level for older dbt. Example: false. |