dbt-bigquery

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

1|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/tottenjordan/me-skittles --skill dbt-bigquery-tottenjordan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dbt-bigquery
Source: https://github.com/tottenjordan/me-skittles/tree/main/gemini/dbt-bigquery
Command: npx skills add https://github.com/tottenjordan/me-skittles --skill dbt-bigquery-tottenjordan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires dbt-bigquery.

What problem does it solve? Building and maintaining dbt pipelines for BigQuery requires deep knowledge of dbt project structure, profiles configuration, SQL optimization patterns, and BigQuery-specific quirks like BigLake 4-part naming. This Skill guides an agent through the full lifecycle of creating, modifying, troubleshooting, and validating dbt projects without common pitfalls like missing profiles.yml files or unsafe dbt run executions. ## Core Features & Use Cases - dbt Project Scaffolding: Initializes new dbt projects in a dedicated folder with dbt_project.yml, profiles.yml, models, and tests correctly configured for BigQuery. - SQL Optimization & Data Cleaning: Automatically rewrites anti-patterns (e.g., IN subqueries to EXISTS) and applies mandatory data cleaning protocols, with summary sections in every response. - Troubleshooting & Validation: Compiles pipelines with dbt compile, runs dbt test, diagnoses remote Cloud Composer DAG failures via gcloud logging, and never executes dbt run without explicit confirmation. - Use Case: Ask the agent to add a new incremental model joining two BigQuery datasets; it will fetch schemas with bq CLI, write the model with proper ref/source syntax and config block, add unit tests, and compile to verify correctness. ## Quick Start Create a new dbt model that aggregates daily sales from my BigQuery raw_orders table and validate it compiles correctly.

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 new dbt project for BigQuery?▼

Initialize the project in a dedicated subdirectory using dbt init --skip-profile-setup, then manually create dbt_project.yml and profiles.yml with matching profile names and correct BigQuery project, dataset, and location settings. Install dbt-bigquery in a Python virtual environment first.

How to optimize SQL queries inside dbt models for BigQuery?▼

Rewrite WHERE col IN (SELECT ...) and COUNT-based existence checks as WHERE EXISTS subqueries, which are applied automatically. Replacing UNION with UNION ALL or COUNT(DISTINCT) with APPROX_COUNT_DISTINCT requires explicit user confirmation due to accuracy tradeoffs.

Does dbt-bigquery support BigLake Iceberg tables with 4-part naming?▼

The dbt-bigquery adapter is hardcoded to 3-part naming and does not natively support Project.Catalog.Dataset.Table. Work around it by concatenating catalog and dataset into the schema field of the source definition, though this conflicts with standard generate_schema_name environment prefixes.

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

This error means profiles.yml is missing from the dbt project directory or remote bundle, or its profile name does not match dbt_project.yml. Ensure profiles.yml sits alongside dbt_project.yml or set DBT_PROFILES_DIR, with correct BigQuery project, dataset, and location mappings.

Can the agent run dbt run to execute my pipeline automatically?▼

No. The skill strictly prohibits executing dbt run without explicit user confirmation. It uses dbt compile and dbt test to validate syntax, dependencies, and model logic safely without side effects, then lets the user trigger actual execution.