Dbt
ภาพรวม
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
dbt MCP — manifest/run_results/sources/catalog parsing + DQ result tables (BigQuery/Postgres)
สามเสาของ PopNx MCP
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
- เสียงผู้ใช้iยังไม่มีรีวิวรีวิวเปิดพร้อมระบบบัญชีในขั้นถัดไป
- ผลตรวจเบื้องต้นของเราiผ่าน 2 จาก 2 ข้อตรวจจากข้อมูลที่เปิดอยู่ ยังไม่ได้สแกนโค้ด
- การใช้งานiยังใหม่มาก↓ 71/สัปดาห์ · ★ 0
ใช้ทำอะไรได้
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
- การเชื่อมต่อ: รันบนเครื่อง
- ช่องทาง (transport): stdio
- หมวด: ฐานข้อมูลและชุดข้อมูล
- ต้องใส่ค่าเหล่านี้: DBT_PROJECT_DIR, PG_CONNECTION_STRING
ติดตั้ง
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ก่อนติดตั้ง
- ผลตรวจเบื้องต้น: ผ่าน 2 จาก 2 ข้อ
- รันในเครื่องคุณด้วยสิทธิ์ของผู้ใช้คุณ (ไฟล์ อินเทอร์เน็ต แอปต่าง ๆ)
- ค่าที่คุณต้องใส่เอง:
DBT_PROJECT_DIR,DBT_TARGET_DIR,DBT_RUN_HISTORY_DIR,DQ_BACKEND,DQ_RESULTS_TABLE,DQ_SCORE_TABLE,GOOGLE_APPLICATION_CREDENTIALS,BQ_PROJECT_ID,PG_CONNECTION_STRING,DBT_ALLOW_WRITE,DQ_SCHEMA,DQ_COL_RUN_AT,DQ_COL_CHECK_TYPE,DQ_COL_STATUS,DQ_COL_DATASET,DQ_COL_TABLE_NAME,DQ_COL_SEVERITY,DQ_COL_FAILURE_COUNT,DQ_COL_MESSAGE,DQ_COL_CHECK_NAME,DQ_COL_SCORE_DATE,DQ_COL_SCOPE,DQ_COL_TIER,DQ_TIER1_TARGET_PCT,DBT_SLA_CONFIG_PATH,DBT_TOOLS,DBT_DISABLE
ค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"dbt": {
"command": "npx",
"args": [
"-y",
"@us-all/dbt-mcp"
],
"env": {
"DBT_PROJECT_DIR": "ใส่ค่าของคุณ",
"DBT_TARGET_DIR": "ใส่ค่าของคุณ",
"DBT_RUN_HISTORY_DIR": "ใส่ค่าของคุณ",
"DQ_BACKEND": "ใส่ค่าของคุณ",
"DQ_RESULTS_TABLE": "ใส่ค่าของคุณ",
"DQ_SCORE_TABLE": "ใส่ค่าของคุณ",
"GOOGLE_APPLICATION_CREDENTIALS": "ใส่ค่าของคุณ",
"BQ_PROJECT_ID": "ใส่ค่าของคุณ",
"PG_CONNECTION_STRING": "ใส่ค่าของคุณ",
"DBT_ALLOW_WRITE": "ใส่ค่าของคุณ",
"DQ_SCHEMA": "ใส่ค่าของคุณ",
"DQ_COL_RUN_AT": "ใส่ค่าของคุณ",
"DQ_COL_CHECK_TYPE": "ใส่ค่าของคุณ",
"DQ_COL_STATUS": "ใส่ค่าของคุณ",
"DQ_COL_DATASET": "ใส่ค่าของคุณ",
"DQ_COL_TABLE_NAME": "ใส่ค่าของคุณ",
"DQ_COL_SEVERITY": "ใส่ค่าของคุณ",
"DQ_COL_FAILURE_COUNT": "ใส่ค่าของคุณ",
"DQ_COL_MESSAGE": "ใส่ค่าของคุณ",
"DQ_COL_CHECK_NAME": "ใส่ค่าของคุณ",
"DQ_COL_SCORE_DATE": "ใส่ค่าของคุณ",
"DQ_COL_SCOPE": "ใส่ค่าของคุณ",
"DQ_COL_TIER": "ใส่ค่าของคุณ",
"DQ_TIER1_TARGET_PCT": "ใส่ค่าของคุณ",
"DBT_SLA_CONFIG_PATH": "ใส่ค่าของคุณ",
"DBT_TOOLS": "ใส่ค่าของคุณ",
"DBT_DISABLE": "ใส่ค่าของคุณ"
}
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add dbt --env DBT_PROJECT_DIR='ใส่ค่าของคุณ' --env DBT_TARGET_DIR='ใส่ค่าของคุณ' --env DBT_RUN_HISTORY_DIR='ใส่ค่าของคุณ' --env DQ_BACKEND='ใส่ค่าของคุณ' --env DQ_RESULTS_TABLE='ใส่ค่าของคุณ' --env DQ_SCORE_TABLE='ใส่ค่าของคุณ' --env GOOGLE_APPLICATION_CREDENTIALS='ใส่ค่าของคุณ' --env BQ_PROJECT_ID='ใส่ค่าของคุณ' --env PG_CONNECTION_STRING='ใส่ค่าของคุณ' --env DBT_ALLOW_WRITE='ใส่ค่าของคุณ' --env DQ_SCHEMA='ใส่ค่าของคุณ' --env DQ_COL_RUN_AT='ใส่ค่าของคุณ' --env DQ_COL_CHECK_TYPE='ใส่ค่าของคุณ' --env DQ_COL_STATUS='ใส่ค่าของคุณ' --env DQ_COL_DATASET='ใส่ค่าของคุณ' --env DQ_COL_TABLE_NAME='ใส่ค่าของคุณ' --env DQ_COL_SEVERITY='ใส่ค่าของคุณ' --env DQ_COL_FAILURE_COUNT='ใส่ค่าของคุณ' --env DQ_COL_MESSAGE='ใส่ค่าของคุณ' --env DQ_COL_CHECK_NAME='ใส่ค่าของคุณ' --env DQ_COL_SCORE_DATE='ใส่ค่าของคุณ' --env DQ_COL_SCOPE='ใส่ค่าของคุณ' --env DQ_COL_TIER='ใส่ค่าของคุณ' --env DQ_TIER1_TARGET_PCT='ใส่ค่าของคุณ' --env DBT_SLA_CONFIG_PATH='ใส่ค่าของคุณ' --env DBT_TOOLS='ใส่ค่าของคุณ' --env DBT_DISABLE='ใส่ค่าของคุณ' -- npx -y @us-all/dbt-mcpเติมค่าที่เว้นว่างไว้ก่อนรัน
หรือคัดลอกค่าตั้งเอง
วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"dbt": {
"command": "npx",
"args": [
"-y",
"@us-all/dbt-mcp"
],
"env": {
"DBT_PROJECT_DIR": "ใส่ค่าของคุณ",
"DBT_TARGET_DIR": "ใส่ค่าของคุณ",
"DBT_RUN_HISTORY_DIR": "ใส่ค่าของคุณ",
"DQ_BACKEND": "ใส่ค่าของคุณ",
"DQ_RESULTS_TABLE": "ใส่ค่าของคุณ",
"DQ_SCORE_TABLE": "ใส่ค่าของคุณ",
"GOOGLE_APPLICATION_CREDENTIALS": "ใส่ค่าของคุณ",
"BQ_PROJECT_ID": "ใส่ค่าของคุณ",
"PG_CONNECTION_STRING": "ใส่ค่าของคุณ",
"DBT_ALLOW_WRITE": "ใส่ค่าของคุณ",
"DQ_SCHEMA": "ใส่ค่าของคุณ",
"DQ_COL_RUN_AT": "ใส่ค่าของคุณ",
"DQ_COL_CHECK_TYPE": "ใส่ค่าของคุณ",
"DQ_COL_STATUS": "ใส่ค่าของคุณ",
"DQ_COL_DATASET": "ใส่ค่าของคุณ",
"DQ_COL_TABLE_NAME": "ใส่ค่าของคุณ",
"DQ_COL_SEVERITY": "ใส่ค่าของคุณ",
"DQ_COL_FAILURE_COUNT": "ใส่ค่าของคุณ",
"DQ_COL_MESSAGE": "ใส่ค่าของคุณ",
"DQ_COL_CHECK_NAME": "ใส่ค่าของคุณ",
"DQ_COL_SCORE_DATE": "ใส่ค่าของคุณ",
"DQ_COL_SCOPE": "ใส่ค่าของคุณ",
"DQ_COL_TIER": "ใส่ค่าของคุณ",
"DQ_TIER1_TARGET_PCT": "ใส่ค่าของคุณ",
"DBT_SLA_CONFIG_PATH": "ใส่ค่าของคุณ",
"DBT_TOOLS": "ใส่ค่าของคุณ",
"DBT_DISABLE": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
หรือคัดลอกค่าตั้งเอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"dbt": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@us-all/dbt-mcp"
],
"env": {
"DBT_PROJECT_DIR": "ใส่ค่าของคุณ",
"DBT_TARGET_DIR": "ใส่ค่าของคุณ",
"DBT_RUN_HISTORY_DIR": "ใส่ค่าของคุณ",
"DQ_BACKEND": "ใส่ค่าของคุณ",
"DQ_RESULTS_TABLE": "ใส่ค่าของคุณ",
"DQ_SCORE_TABLE": "ใส่ค่าของคุณ",
"GOOGLE_APPLICATION_CREDENTIALS": "ใส่ค่าของคุณ",
"BQ_PROJECT_ID": "ใส่ค่าของคุณ",
"PG_CONNECTION_STRING": "ใส่ค่าของคุณ",
"DBT_ALLOW_WRITE": "ใส่ค่าของคุณ",
"DQ_SCHEMA": "ใส่ค่าของคุณ",
"DQ_COL_RUN_AT": "ใส่ค่าของคุณ",
"DQ_COL_CHECK_TYPE": "ใส่ค่าของคุณ",
"DQ_COL_STATUS": "ใส่ค่าของคุณ",
"DQ_COL_DATASET": "ใส่ค่าของคุณ",
"DQ_COL_TABLE_NAME": "ใส่ค่าของคุณ",
"DQ_COL_SEVERITY": "ใส่ค่าของคุณ",
"DQ_COL_FAILURE_COUNT": "ใส่ค่าของคุณ",
"DQ_COL_MESSAGE": "ใส่ค่าของคุณ",
"DQ_COL_CHECK_NAME": "ใส่ค่าของคุณ",
"DQ_COL_SCORE_DATE": "ใส่ค่าของคุณ",
"DQ_COL_SCOPE": "ใส่ค่าของคุณ",
"DQ_COL_TIER": "ใส่ค่าของคุณ",
"DQ_TIER1_TARGET_PCT": "ใส่ค่าของคุณ",
"DBT_SLA_CONFIG_PATH": "ใส่ค่าของคุณ",
"DBT_TOOLS": "ใส่ค่าของคุณ",
"DBT_DISABLE": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
ค่าที่ต้องใส่เอง
- Path to dbt project root (where dbt_project.yml lives).
DBT_TARGET_DIRenvdbt target dir for manifest.json/run_results.json (default: $DBT_PROJECT_DIR/target).DBT_RUN_HISTORY_DIRenvOptional dir for archived run_results.json history (glob-scanned).DQ_BACKENDenvDQ result table backend: 'bigquery' (default) or 'postgres'.DQ_RESULTS_TABLEenvFully qualified DQ checks table, e.g. 'project.data_ops.quality_checks'.DQ_SCORE_TABLEenvFully qualified DQ score-daily table, e.g. 'project.data_ops.quality_score_daily'.GOOGLE_APPLICATION_CREDENTIALSenvService account key path for BigQuery (ADC fallback supported).BQ_PROJECT_IDenvExplicit BigQuery project ID for DQ queries.- Postgres connection string when DQ_BACKEND=postgres.
DBT_ALLOW_WRITEenvReserved for future write tools. Default read-only.DQ_SCHEMAenvDQ result-table schema preset: 'generic' (default) or 'us-all'. Use DQ_COL_* env vars to override individual columns on top of the preset.DQ_COL_RUN_ATenvOverride for the timestamp/date column on the DQ checks table. Default depends on DQ_SCHEMA preset.DQ_COL_CHECK_TYPEenvOverride for the check-type column on the DQ checks table. Default 'check_type'.DQ_COL_STATUSenvOverride for the status column on the DQ checks table. Default 'status'.DQ_COL_DATASETenvOverride for the dataset/source column on the DQ checks table. Default depends on preset.DQ_COL_TABLE_NAMEenvOverride for the table/target-name column on the DQ checks table. Default depends on preset.DQ_COL_SEVERITYenvOverride for the severity/dimension column on the DQ checks table. Default depends on preset.DQ_COL_FAILURE_COUNTenvOverride for the numeric failure-count column on the DQ checks table. Default depends on preset.DQ_COL_MESSAGEenvOverride for the message column on the DQ checks table. Default depends on preset.DQ_COL_CHECK_NAMEenvOverride for the check_name column on the DQ checks table. Set to 'none'/'null'/'-' to synthesize check_name from check_type and table_name.DQ_COL_SCORE_DATEenvOverride for the date column on the DQ score-daily table. Default depends on preset.DQ_COL_SCOPEenvOverride for the scope column on the DQ score-daily table. Set to 'none'/'null'/'-' if the table has no per-scope rollup.DQ_COL_TIERenvOverride for the tier column on the DQ score-daily table. Set to 'none'/'null'/'-' if the table has no tier dimension.DQ_TIER1_TARGET_PCTenvWhen no tier column is configured (us-all preset or DQ_COL_TIER=none), the overall_score threshold dq-tier-status compares against (default 99.5). Superseded by DBT_SLA_CONFIG_PATH tier_sla.1 if both…DBT_SLA_CONFIG_PATHenvOptional path to a YAML file that defines tier_sla (per-tier overall_score targets) and dbt_sla (test/freshness pass rates). When set, dq-tier-status and dq-tier-by-source read tier targets from this…DBT_TOOLSenvComma-separated category allowlist (dbt,quality,meta).DBT_DISABLEenvComma-separated category disablelist.
ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
ใช้กับโปรแกรมไหนได้
ดูจากแบบการต่อของ server ตัวนี้ และเอกสารของผู้ทำโปรแกรมแต่ละตัว ตรวจเมื่อ 10 พ.ย. 2569
ติดตั้งบนเครื่องได้ใน
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
ทำอะไรได้บ้าง
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
ผลตรวจเบื้องต้นi
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 10 พ.ย. 2569
- ✓ ผ่าน
ตัวตนผู้ทำตรงกับ repo
ชื่อใน registry ยืนยันด้วยบัญชี GitHub us-all ซึ่งเป็นเจ้าของ repo
- ✓ ผ่าน
ยังมีคนดูแล
มีการแก้โค้ดล่าสุด 4 เดือนที่ผ่านมา
- … ยังไม่ตรวจ
มีสัญญาอนุญาต (license)
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
- – ไม่เกี่ยว
endpoint ตอบ
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
- – ไม่เกี่ยว
ล็อกอินแบบ OAuth
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
- … ยังไม่ตรวจ
คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับตัวอื่นในหมวด ฐานข้อมูลและชุดข้อมูลi
- ดาวมากกว่า 0% ของอีก 1160 ตัวในหมวดนี้
- ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 15% ของอีก 1160 ตัวในหมวดนี้
- ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 1160 ตัวในหมวดนี้
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
คำถามที่พบบ่อย
Dbt ปลอดภัยไหม?
จากการตรวจเบื้องต้นของเรา ผ่าน 2 จาก 2 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
ต้องใช้กุญแจหรือรหัสอะไรบ้าง?
ต้องใส่ค่าเหล่านี้: DBT_PROJECT_DIR, PG_CONNECTION_STRING
ตัวนี้รันบนเครื่องหรือบนคลาวด์?
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
ยังมีคนดูแลอยู่ไหม?
repo บน GitHub มีการแก้โค้ดล่าสุด 4 เดือนที่ผ่านมา และส่งรุ่นล่าสุด (1.0.7) เข้า registry 5 เดือนที่ผ่านมา
ใช้กับโปรแกรมไหนได้บ้าง?
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย
มีตัวไหนใช้แทนได้บ้าง?
ในหมวดเดียวกันมี Dbx, MCP Toolbox for Databases, MCP Toolbox for Databases
ตัวที่ใช้แทนได้
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
MCP Toolbox for Databases
MCP Toolbox for Databases enables your agent to connect to your database.
MCP Toolbox for Databases
MCP Toolbox for Databases enables your agent to connect to your database.
README จากผู้ทำ
เปิดอ่าน README
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
@us-all/dbt-mcp
dbt MCP server —
manifest.json,run_results.json,sources.json,catalog.json, plus DQ result tables (BigQuery / Postgres) behind one stdio MCP. Built on@us-all/mcp-toolkit.
A read-only window into your dbt project for LLM clients. No dbt run triggering — just deep introspection, run-history analysis, source freshness, per-column test coverage, lineage walks, and (if you have a custom DQ result table) historical check trends and Tier SLA status.
For DAG triggering / run history / log tails, install the companion [@us-all/airflow-mcp](https://www.npmjs.com/package/@us-all/airflow-mcp) alongside.
- 27 tools across 3 categories (
dbt,quality,meta) — 21 primitive tools + 5 aggregations + 1 meta - 4 MCP Prompts for triage workflows
- 5 aggregation tools that replace 3-5 round-trips of "list / get / list"
extractFieldsresponse projection on high-volume reads- Read-only by default
- Hybrid backend: BigQuery (default) or Postgres for DQ result tables — both peer-imported lazily
Install
# 1. add the MCP server
pnpm add -D @us-all/dbt-mcp
2. add the DQ backend you actually use (only if you query custom DQ tables):
pnpm add -D @google-cloud/bigquery # OR pnpm add -D pg
Run
DBT_PROJECT_DIR=/path/to/dbt-project \
DQ_RESULTS_TABLE=my-project.data_ops.quality_checks \ npx @us-all/dbt-mcp
The server speaks MCP stdio; wire it into Claude Desktop / Cursor / any MCP client. Set MCP_TRANSPORT=http to opt in to Streamable HTTP transport (Bearer auth, /health endpoint).
Categories
| Category | Tools | Purpose |
|---|---|---|
dbt | 15 + 3 aggregations | Parse manifest.json / run_results.json / sources.json / catalog.json |
quality | 6 + 2 aggregations | Query quality_checks and quality_score_daily (BQ or PG); per-tier rollup via dq-tier-by-source |
meta | 1 (always on) | search-tools for natural-language tool discovery |
Toggle with DBT_TOOLS=dbt (allowlist) or DBT_DISABLE=quality (denylist).
Tools at a glance
dbt (15 + 3)
dbt-list-models, dbt-get-model, dbt-list-tests, dbt-get-test, dbt-list-sources, dbt-get-source, dbt-list-exposures, dbt-list-macros, dbt-get-macro, dbt-list-runs, dbt-get-run-results, dbt-failed-tests, dbt-slow-models, dbt-coverage, dbt-graph, freshness-status, incident-context, dbt-sla-status
quality (6 + 2)
dq-list-checks, dq-get-check-history, dq-failed-checks-by-dataset, dq-score-trend, dq-tier-status, dq-tier-by-source, failed-tests-summary, dq-score-snapshot
Prompts
| Prompt | Use when |
|---|---|
investigate-failed-tests | "What's broken in the last 24h?" |
freshness-degradation-triage | "Are any sources stale?" (Tier 1 focus optional) |
dq-trend-report | "Give me a stakeholder-friendly DQ trend report" |
incident-triage | "Triage " — bundles all signals |
Environment variables
| Env | Required | Notes |
|---|---|---|
DBT_PROJECT_DIR | yes | dbt project root (where dbt_project.yml lives) |
DBT_TARGET_DIR | no | Defaults to $DBT_PROJECT_DIR/target |
DBT_RUN_HISTORY_DIR | no | Optional dir for archived run_results.json history |
DQ_BACKEND | no | bigquery (default) or postgres |
DQ_RESULTS_TABLE | no | FQN of the checks table; required only for checks-based quality tools |
DQ_SCORE_TABLE | no | FQN of the score-daily table; required for score-only tools |
GOOGLE_APPLICATION_CREDENTIALS | no | For BigQuery backend (ADC fallback supported) |
BQ_PROJECT_ID | no | Explicit BQ project (otherwise inferred from ADC) |
PG_CONNECTION_STRING | no | When DQ_BACKEND=postgres (secret) |
DQ_SCHEMA | no | generic (default) or us-all — base schema preset for the quality category |
DQ_COL_* | no | Per-column overrides on top of DQ_SCHEMA (see below). Overrides must be simple SQL identifiers. |
DQ_TIER1_TARGET_PCT | no | Tier 1 SLA threshold for dq-tier-status when no tier column is configured (default 99.5). Superseded by DBT_SLA_CONFIG_PATH tier_sla.1 if both are set. |
DBT_SLA_CONFIG_PATH | no | Optional YAML path with tier_sla and dbt_sla blocks. Drives dq-tier-status thresholds and dq-tier-by-source per-tier targets. Mtime cached. |
DBT_ALLOW_WRITE | no | Reserved for future write tools (none currently) |
DBT_TOOLS / DBT_DISABLE | no | Category toggles |
DQ result-table schema flavors
The quality category supports two schema presets via DQ_SCHEMA:
DQ_SCHEMA=generic (default)
Columns assumed on DQ_RESULTS_TABLE: run_at, check_name, check_type, dataset, table_name, status, severity, failure_count, message.
Columns assumed on DQ_SCORE_TABLE: score_date, scope, tier, completeness_pct, freshness_pct, validity_pct, anomaly_free_pct, overall_score.
dq-tier-status rolls up by Tier 1/2/3 against the per-scope rows.
DQ_SCHEMA=us-all
Real schema used at us-all (Postgres data_ops database):
quality_checks: run_date, check_type, dimension, source, target_name, status, metric_value, threshold, details (JSONB).
quality_score_daily: run_date, completeness_pct, freshness_pct, validity_pct, anomaly_free_pct, overall_score, total_checks, failed_checks.
In this flavor quality_score_daily is one row per day (no per-scope rollup, no tier column). dq-tier-status falls back to comparing the day's overall_score against DQ_TIER1_TARGET_PCT (default 99.5).
dq-get-check-history requires checkName formatted as ' : ' since us-all has no native check_name column.
Per-column overrides — DQ_COL_*
If your DQ tables don't match either preset, layer per-column overrides on top of DQ_SCHEMA. Any DQ_COL_* env var, when set, replaces the preset value for that single column. Unset vars keep the preset default.
Overrides are validated as simple SQL identifiers to avoid injecting raw SQL through environment variables. Table names in DQ_RESULTS_TABLE / DQ_SCORE_TABLE are also validated and quoted for the configured backend.
| Env var | Logical concept | Generic preset | us-all preset |
|---|---|---|---|
DQ_COL_RUN_AT | timestamp/date on the checks table | run_at | run_date |
DQ_COL_CHECK_TYPE | check type / dimension family | check_type | check_type |
DQ_COL_STATUS | pass/fail/warn/error | status | status |
DQ_COL_DATASET | dataset / source / schema | dataset | source |
DQ_COL_TABLE_NAME | table or target name | table_name | target_name |
DQ_COL_SEVERITY | severity / dimension | severity | dimension |
DQ_COL_FAILURE_COUNT | numeric failure count / metric | failure_count | metric_value |
DQ_COL_MESSAGE | free-text or JSON message | message | details::text |
DQ_COL_CHECK_NAME | natural identifier of the check | check_name | _(none)_ |
DQ_COL_SCORE_DATE | date column on the score table | score_date | run_date |
DQ_COL_SCOPE | scope/tenant column on score table | scope | _(none)_ |
DQ_COL_TIER | tier column on score table | tier | _(none)_ |
For the three nullable columns (DQ_COL_CHECK_NAME, DQ_COL_SCOPE, DQ_COL_TIER), set the value to none / null / - to declare "no native column":
- Without
check_name→ the tools synthesize one fromcheck_type || ':' || table_name.dq-get-check-historythen expectscheckNameformatted as' : '. - Without
scope→dq-score-trend'sscopefilter is ignored (with a caveat) anddq-tier-statusswitches to the single-overall_scorepath that compares againstDQ_TIER1_TARGET_PCT. - Without
tier→ same single-overall_scorefallback.
Example — generic preset against a Postgres schema where columns happen to be named differently:
DQ_SCHEMA=generic
DQ_COL_RUN_AT=checked_at DQ_COL_DATASET=schema_name DQ_COL_TABLE_NAME=tbl DQ_COL_FAILURE_COUNT=fail_n DQ_COL_CHECK_NAME=none # synthesize from check_type+tbl DQ_COL_SCOPE=none # no per-team rollup DQ_COL_TIER=none # use DQ_TIER1_TARGET_PCT instead
SLA config (optional) — DBT_SLA_CONFIG_PATH
Set DBT_SLA_CONFIG_PATH to a YAML file to surface project-defined tier targets and DBT SLAs to the quality tools. Schema (extra keys ignored):
dbt_sla:
test_pass_pct: 99.0 # consumed by dbt-sla-status (test pass rate threshold) freshness_pass_pct: 99.5 # consumed by dbt-sla-status (source freshness pass rate threshold)
tier_sla: 1: 99.5 # tier-1 overall_score / per-source pass-rate target 2: 99.0 3: 95.0
When set, the tier_sla map drives:
dq-tier-status— per-tier rollup compares each row'soverall_scoreagainst the matching target. Without this file, hardcoded{1: 99.5, 2: 99.0, 3: 95.0}is used.dq-tier-by-source— per-source pass-rate is compared to the target for that source's tier (resolved from dbt sources.ymlmeta.tier).dq-tier-statusno-tier-column path (us-all preset /DQ_COL_TIER=none) — usestier_sla.1as the single target.DQ_TIER1_TARGET_PCTenv still works as a fallback when no SLA file is set.
The dbt_sla block drives:
dbt-sla-status— computes test pass rate from latestrun_results.jsonand freshness pass rate fromsources.json, then compares each axis againstdbt_sla.test_pass_pct/dbt_sla.freshness_pass_pct. ReturnspassPct,target,meetingper axis plus caveats when fields or artifacts are missing.
The file is mtime-cached; edits between tool calls are picked up automatically.
Per-tier rollup from quality_checks — dq-tier-by-source
For schemas where quality_score_daily has only one row per day (no per-scope/tier breakdown), dq-tier-by-source reconstructs a per-tier picture from the raw quality_checks rows. Two modes:
mode: "source" (default) — group by source/dataset column
Use when each row of quality_checks represents a check on a *source group* and the dataset/source column carries the dbt source-group name directly.
- Builds a
source_name -> tiermap from the dbt manifest'ssources. . .meta.tier(first table's tier per source group). - Groups
quality_checksrows by the dataset/source column and computes pass rate per source over a date orsinceHourswindow. - Looks up each source's tier and target (from SLA config or defaults), reports meeting / missing per tier.
mode: "table" — group by table_name column
Use when the dataset/source column is a category (bq / dbt / airflow) and the actual dbt source-table identifier lives in the table_name / target_name column as . . Common in checks tables that consolidate signals from heterogeneous backends.
- Builds a
. -> tiermap from the manifest using each source entry'ssource_name + name + meta.tier— picks up *table-level* tier overrides naturally. - Groups
quality_checksrows by thetable_namecolumn. Pre-filter viasourceFilter(e.g.sourceFilter: "bq") when only some categories produce parseable target names. - Each rollup key is parsed as
.; rows without a.or whose key is not in the manifest land incaveats[].
Untiered rows (no manifest meta.tier) and unparseable rows always appear in caveats[] so you can tier them or accept the gap.
Tested-against schemas
- dbt manifest schema v11 / v12 — the current top version. dbt 1.7 emits v11; dbt 1.8 through 1.12 all emit v12 (the schema evolves additively in-place). Newer/unknown versions still parse, but a
caveatsline will flag them.