dbt-bigquery

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

1|Updated Aug 30, 2026
One-click install
npx skills add https://github.com/FeexSystems/3WM-SONIK-LABS --skill dbt-bigquery-feexsystems
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dbt-bigquery
Source: https://github.com/FeexSystems/3WM-SONIK-LABS/tree/main/.gemini/skills/dbt-bigquery
Command: npx skills add https://github.com/FeexSystems/3WM-SONIK-LABS --skill dbt-bigquery-feexsystems

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 Iceberg naming. This Skill guides an AI agent through the full lifecycle of creating, modifying, testing, and troubleshooting dbt projects so pipelines compile correctly and follow best practices. ## Core Features & Use Cases - dbt Project Scaffolding: Initializes new dbt projects in a dedicated folder with correct dbt_project.yml and profiles.yml configuration mapped to BigQuery settings. - SQL Optimization: Automatically rewrites inefficient patterns (e.g., IN (SELECT ...) to EXISTS) and proposes conditional optimizations like UNION ALL or APPROX_COUNT_DISTINCT with user confirmation. - Validation & Testing: Compiles projects with dbt compile, runs dbt test, and generates unit tests alongside models using schema-derived test data. - Troubleshooting: Diagnoses local and remote orchestration failures (e.g., Cloud Composer DAG errors, missing profile errors) using gcloud logging and root cause analysis. - Use Case: Ask the agent to create a new dbt model that transforms raw events from a BigQuery source table into a cleaned, documented, and unit-tested staging model with proper ref() and source() references. ## Quick Start Create a dbt model that aggregates daily revenue from my BigQuery orders table, then compile and test the project.

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 with skip-profile-setup, then manually create dbt_project.yml and profiles.yml. The profiles.yml must match the profile name in dbt_project.yml and map the correct BigQuery project, dataset, and location.

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

Replace WHERE col IN (SELECT ...) and COUNT-based existence checks with WHERE EXISTS subqueries, which are mandatory rewrites. Conditional optimizations like UNION ALL or APPROX_COUNT_DISTINCT require user confirmation since they trade accuracy or deduplication for speed.

Does dbt-bigquery support BigLake Iceberg tables?▼

The dbt-bigquery adapter does not natively support 4-part Project.Catalog.Dataset.Table naming. Work around this by concatenating the catalog and dataset into the schema field of your source definition, 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 from the dbt project directory or remote bundle. Generate a profiles.yml alongside dbt_project.yml that matches the requested profile name, or point DBT_PROFILES_DIR to its location.

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

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