dbt-bigquery

Generates, modifies, and optimizes dbt models and pipelines targeting Google BigQuery.

Updated Aug 26, 2026
One-click install
npx skills add https://github.com/SmileAfterBurn/pani-dumka-ai --skill dbt-bigquery-smileafterburn
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dbt-bigquery
Source: https://github.com/SmileAfterBurn/pani-dumka-ai/tree/main/.gemini/skills/dbt-bigquery
Command: npx skills add https://github.com/SmileAfterBurn/pani-dumka-ai --skill dbt-bigquery-smileafterburn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires dbt-bigquery.

What problem does it solve? Building and maintaining dbt pipelines for BigQuery involves repetitive setup, error-prone SQL, and subtle configuration pitfalls like missing profiles.yml files. This Skill guides an AI agent through the full dbt workflow—project initialization, model authoring, SQL optimization, compilation, and testing—so pipelines are correct and efficient before they run. ## Core Features & Use Cases - dbt Project Scaffolding: Initializes new dbt projects with dbt_project.yml, profiles.yml, models, and tests in a dedicated directory. - SQL Optimization & Data Cleaning: Automatically rewrites inefficient patterns (e.g., IN subqueries to EXISTS) and applies mandatory data cleaning protocols to every pipeline. - Validation & Troubleshooting: Compiles models with dbt compile, runs dbt test, and diagnoses remote orchestration failures via gcloud logging. - Use Case: Ask the agent to create a dbt model that transforms raw GA4 events in BigQuery into a daily sessions table; it will inspect schemas, write the model with proper config and sources, add unit tests, and compile it for verification. ## Quick Start Create a dbt model that aggregates my BigQuery sales table into daily revenue by region and compile the project to verify it.

Frequently Asked Questions about dbt-bigquery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a dbt model for BigQuery?▼

Define a SQL file under the models/ directory with a config block specifying the materialization, and reference upstream tables using ref() or source() instead of hardcoded names. Then run dbt compile to validate syntax and dependencies before executing.

How to optimize SQL queries in a dbt BigQuery project?▼

Replace IN subqueries and COUNT-based existence checks with WHERE EXISTS clauses, which BigQuery executes more efficiently. Conditional rewrites like UNION to UNION ALL or COUNT(DISTINCT) to APPROX_COUNT_DISTINCT are faster but require user confirmation due to accuracy tradeoffs.

Does dbt-bigquery support BigLake Iceberg tables?▼

The dbt-bigquery adapter does not natively support 4-part Project.Catalog.Dataset.Table naming. A workaround concatenates the catalog and dataset into the schema field of the source definition, though this conflicts with standard environment schema prefixing.

Why does my dbt pipeline fail with 'Could not find profile named' error?▼

This error occurs when profiles.yml is missing from the dbt project directory or remote orchestration bundle. Ensure profiles.yml exists alongside dbt_project.yml and maps the correct BigQuery project, dataset, and location matching the profile name in dbt_project.yml.

Can the agent run dbt run automatically?▼

No, dbt run is never executed without explicit user confirmation. The workflow relies on dbt compile and dbt test to validate correctness without side effects, leaving actual execution to the user.