dbt-bigquery

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

Updated Aug 16, 2026
One-click install
npx skills add https://github.com/1919114514yasenpai-maker/focus-quest --skill dbt-bigquery-1919114514yasenpai-maker
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dbt-bigquery
Source: https://github.com/1919114514yasenpai-maker/focus-quest/tree/main/.gemini/skills/dbt-bigquery
Command: npx skills add https://github.com/1919114514yasenpai-maker/focus-quest --skill dbt-bigquery-1919114514yasenpai-maker

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, and BigQuery-specific quirks like BigLake Iceberg naming. This Skill guides an AI agent through the full lifecycle of creating, modifying, troubleshooting, and validating dbt projects so models compile correctly and follow best practices. ## Core Features & Use Cases - dbt Project Scaffolding & Configuration: Initializes new dbt projects in a dedicated folder with correct dbt_project.yml and profiles.yml settings mapped to BigQuery project, dataset, and location. - SQL Optimization & Data Cleaning: Automatically rewrites inefficient patterns (e.g., IN (SELECT ...) to EXISTS) and applies mandatory data cleaning protocols, with summary sections in every response. - Troubleshooting & Validation: Diagnoses local and remote (Cloud Composer) DAG failures via gcloud logging, compiles with dbt compile, and never runs dbt run without explicit user confirmation. - Use Case: Ask the agent to create a new dbt model that transforms a raw BigQuery table into a cleaned, documented, unit-tested staging model — it will fetch schemas, generate the model with a config block, add tests, and compile to verify. ## Quick Start Ask the agent to create a new dbt model in BigQuery that aggregates daily sales from your source table, and it will scaffold, optimize, and compile the pipeline for you.

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 model for BigQuery?▼

Locate or initialize a dbt project with dbt_project.yml, then add a SQL file under models/ with a config block specifying the materialization. Use ref() and source() for dependencies, ensure profiles.yml maps to your BigQuery project and dataset, and validate with dbt compile.

How do I optimize SQL queries inside a dbt project?▼

Replace WHERE col IN (SELECT ...) and COUNT-based existence checks with WHERE EXISTS subqueries, which are mandatory rewrites. UNION to UNION ALL and COUNT(DISTINCT) to APPROX_COUNT_DISTINCT are faster but require user confirmation due to duplicate or approximate results.

Does dbt-bigquery support BigLake Iceberg tables?▼

The dbt-bigquery adapter does not natively support 4-part Project.Catalog.Dataset.Table naming. Work around it by concatenating catalog and dataset into the schema field of sources.yml, though this conflicts with standard environment schema prefixing.

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

This error means profiles.yml is missing or mismatched with the profile name in dbt_project.yml. Generate a profiles.yml inside the dbt project folder mapping the correct BigQuery project, dataset, and location, or set DBT_PROFILES_DIR to point to it.

Can the agent run dbt run automatically to execute models?▼

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