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 AI agent through the full lifecycle of creating, modifying, troubleshooting, and validating dbt models so pipelines 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 anti-patterns like IN (SELECT ...) to EXISTS, proposes UNION ALL and APPROX_COUNT_DISTINCT with confirmation, and applies a mandatory data-cleaning protocol. - Safe Validation Workflow: Compiles with dbt compile and runs dbt test without ever executing dbt run unless the user explicitly confirms, preventing unintended warehouse changes. - Troubleshooting & BigLake Support: Diagnoses local and remote (Cloud Composer) DAG failures via gcloud logging read, and handles BigLake Iceberg tables through catalog-dataset concatenation in source definitions. - Use Case: Ask the agent to create a new dbt model aggregating daily sales from a raw BigQuery table; it will inspect schemas with bq CLI, generate the model with a config block and descriptions, add unit tests, and compile the project to verify correctness. ## Quick Start Ask the agent to create a new dbt model in BigQuery that aggregates your source table, and it will set up the project, write the SQL, and validate it with dbt compile.