Official agent skill

dbt Snowflake to BigQuery Translator

by google in google/skills

Translates Snowflake dbt SQL models into standardized BigQuery SQL, keeping Jinja constructs and tracking progress in a migration tasks file.

OfficialApache-2.0Auto-check passedDatabases

Install dbt Snowflake to BigQuery Translator

skills CLI
$ npx skills add google/skills --skill dbt-sf-to-bq-translator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install google/skills dbt-sf-to-bq-translator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/google/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cloud/dbt-sf-to-bq-translator .claude/skills/dbt-sf-to-bq-translator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dbt-sf-to-bq-translator
GitHub stars
21k
Token cost
~2.7k tokens
SKILL.md length
1,159 words
Files
4 (incl. scripts, references)
Skills in repo
150
Repo updated
First seen
Licence
Apache-2.0

At a glance

Translates Snowflake dbt SQL models into standardized BigQuery SQL, keeping Jinja constructs and tracking progress in a migration tasks file.

  • Works in 6 steps: Mandatory File Header → Standardized JSON Extraction → Explicit Type Safety → …
  • Migrating a Snowflake dbt project to BigQuery
  • Runs Python scripts from its folder; calls gcloud and python3
  • Converting individual dbt models while keeping Jinja macros intact

What it does

This skill migrates Snowflake dbt models to Google BigQuery SQL. It handles SQL compilation, masks Jinja macro placeholders, uses the BigQuery Translation Service migration workflow, applies AST-based config transformations, and enforces house standards: a copyright header at the top of each file, explicit type casts, standardized JSON extraction, and deduplication with QUALIFY on _extracted_at.

The agent works from a tasks.md file under migration_plan, logging progress and a closing summary so a human supervisor can follow along and so it can recover from errors. Setup needs the Google Cloud SDK, gcloud authentication, a project with billing, the BigQuery, Migration and Storage APIs enabled, and a region. A new project starts by asking for a migration name, input and output directories, a GCS staging bucket, a region and optional source metadata. Bundled scripts include dbt_translator.py and bulk_translate_via_gcloud.py. It is not for generic BigQuery queries or non-Snowflake migrations.

When your agent uses it

  • Migrating a Snowflake dbt project to BigQuery
  • Converting individual dbt models while keeping Jinja macros intact
  • Running bulk translations through the BigQuery Translation Service

Example prompts

  • “Translate the Snowflake dbt models in ./models to BigQuery SQL and write them to ./models_bq.”
  • “Start a new migration project called orders_migration with a GCS staging bucket.”
  • “Run the bulk translation for my dbt folder through the BigQuery Translation Service.”

Requirements

  • Google Cloud SDK, authenticated with gcloud
  • A Google Cloud project with billing and the BigQuery, Migration and Storage APIs enabled
  • A GCS bucket for staging translation assets
  • Snowflake dbt SQL models as input

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Mandatory File Header
  2. Standardized JSON Extraction
  3. Explicit Type Safety
  4. Prescriptive String & Date Functions
  5. Mandatory Deduplication & Joins
  6. Preserve Jinja Constructs

What it can do on your machine

Read from SKILL.md and the folder at commit 4b940dd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • gcloud
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.cloud.google.com
    • cloud.google.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

dbt Snowflake to BigQuery Translator loads about 2.7k tokens when it runs, and up to ~3.3k if it reads all its reference files. Until then it costs about 114 tokens; SKILL.md has 1,159 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~114
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from google/skills at commit 4b940dd, republished under its Apache-2.0 licence (© google). 1,159 words, ~2,673 tokens.

Download SKILL.mdSave it as .claude/skills/dbt-sf-to-bq-translator/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
dbt-sf-to-bq-translator
description
Translates Snowflake dbt SQL models to Standardized BigQuery SQL. Handles SQL compilation, Jinja macro placeholder masking, BigQuery Translation Service migration workflows, AST-based config transformations, explicit type casting, JSON extraction standardization, and deduplication. Use when migrating Snowflake dbt pipelines or models to Google Cloud BigQuery. Don't use for generic BigQuery queries or non-Snowflake SQL migrations.
metadata.version
1.0.1
metadata.category
BigDataAndAnalytics

dbt Snowflake to BigQuery Translator

You are responsible for:

  1. Dialect Translation: Translating Snowflake dbt SQL models to Standardized Google BigQuery SQL.
  2. Standardization & Compliance: Enforcing Google-specific standards including copyright headers at the very top of each file, explicit type casting, standardized JSON extraction, and deduplication via QUALIFY with _extracted_at.
  3. Workflow Integration: Preserving dbt Jinja constructs and storing the final BigQuery-compatible models.

Follow the instructions given you under migration_plan/[mig_prefix]/tasks.md. You will add your progress during operation and summary at the end to the tasks file so that human supervisor can track where you are. You recover from errors by checking the tasks file.

Prerequisites & Environment Setup

Before starting the translation, ensure your Google Cloud environment is properly configured:

  1. Google Cloud SDK: Install the Google Cloud SDK if not already installed.
  2. Authentication: Authenticate your CLI session:
    bash
    gcloud auth login
    gcloud auth application-default login
  3. Project Configuration: Set your active GCP project:
    bash
    gcloud config set project {project_id}
  4. Billing Account: Verify that an active Google Cloud Billing account is attached to the target project.
  5. Enable Required APIs: Ensure BigQuery, Migration, and Storage services are enabled:
    bash
    gcloud services enable bigquerymigration.googleapis.com storage.googleapis.com bigquery.googleapis.com
  6. Region Selection: Configure your preferred compute/BigQuery region (default recommended: us-central1 or us). See Google Cloud Locations:
    bash
    gcloud config set compute/region us-central1

Steps

  • Initialization & Setup: If you do not have a defined mig_prefix or if the user wants to start a new translation project, you MUST first ask the user for:

    1. Migration Project Name (e.g. my_migration_project).
    2. Input directory containing Snowflake SQL files.
    3. Output directory where BigQuery SQL files should be saved.
    4. GCS Bucket name for staging translation assets.
    5. GCP Region (e.g. us or eu).
    6. (Optional) Local path to a directory or .zip file containing source database metadata (such as columns.csv or tables.csv). Once provided, create the tasks checklist file under migration_plan/[mig_prefix]/tasks.md with unchecked tasks representing the migration steps.
  • Automated Execution via Bundled Scripts: Execute the deterministic end-to-end migration using the bundled translation script scripts/bulk_translate_via_gcloud.py:

    bash
    python3 scripts/bulk_translate_via_gcloud.py \
      --input <input_dir> \
      --output <output_dir> \
      --bucket <gcs_bucket> \
      --location <region> \
      [--metadata <metadata_path>]

    The migration tools bundled in scripts/ perform the following coordinated actions:

    • scripts/bulk_translate_via_gcloud.py: Orchestrates end-to-end bulk migration, automating pre-processing, GCS upload, BigQuery Translation Service invocation, download, post-processing, and YAML configuration copying.
    • scripts/dbt_translator.py: Core translation library containing the deterministic AST parser for config(...), Jinja placeholder masking and restoration, JSON extraction sanitization, macro auditing, casing/join standardization, and copyright header enforcement.
  • Detailed Translation Lifecycle (Executed by Scripts):

    1. Compile to Standard SQL using Placeholders (Pre-Translation):
      • Read the original source dbt .sql files. Extract and strip the {{ config(...) }} header block from the top of each file.
      • Replace dbt macro calls with standard-SQL-compliant placeholder identifiers to prevent BigQuery Translation Service from throwing syntax errors:
        • Replace {{ source('src_name', 'table_name') }} with _DBT_SOURCE_src_name_DBTSEP_table_name_
        • Replace {{ ref('model_name') }} with _DBT_REF_model_name_
      • Eliminate Jinja curly braces ({{ ... }}) from the SQL prior to translation, ensuring the transpiler processes 100% valid Snowflake dialect SQL.
    2. Isolate the SQL Files:
      • Save these pre-processed, Jinja-free files to a staging input directory ready for GCS upload.
    3. Pre-Process Metadata & Translate SQL via BigQuery Translation Service:
      • If a metadata path is provided, map table entries matching discovered dbt models/sources to their placeholder names in columns.csv and tables.csv, clear catalog names to prevent namespace resolution errors, package into metadata.zip, and upload to GCS.
      • Upload staging SQL files to GCS: gcloud storage cp <staging_input_dir>/*.sql gs://[YOUR_BUCKET]/migration_input/
      • Create migration_config.yaml specifying snowflakeDialect as source and bigqueryDialect as target (with schemaPath pointing to metadata.zip if provided).
      • Trigger translation workflow: gcloud bq migration-workflows create --location=<region> --config-file=migration_config.yaml --no-async
      • Download translated GoogleSQL files from GCS: gcloud storage cp gs://[YOUR_BUCKET]/migration_output/*.sql <translated_output_dir>/
    4. Restore Placeholders & Re-Embed dbt Logic:
      • Take the translated BigQuery SQL files and perform advanced post-processing:
        • AST-Based Config Transformation: Parse the original {{ config(...) }} block, stripping Snowflake-specific parameters like copy_grants, transient, and secure. Sanitize hooks (pre_hook and post_hook) to remove invalid Snowflake commands like ALTER ICEBERG TABLE ... REFRESH or UNSET SECURE, while preserving valid ones.
        • Reference Resolver (Namespace Resolution): Scan the SQL for hardcoded Snowflake database/schema table paths in FROM and JOIN clauses, and map them back to native dbt {{ ref(...) }} or {{ source(...) }} macros by resolving against discovered project models and sources.
        • Macro & Syntax Audit: Scan all {{ ... }} Jinja expressions and log warnings for any custom/non-allowlisted database-specific macros. Also audit these blocks for Snowflake-specific syntax (e.g. ::date, dateadd, to_date) that may have been skipped or masked, listing warning comments directly in the file.
        • Balanced SQL Edge-Cases Sanitization: Convert date cast suffixes (::date -> CAST(... AS DATE)), datetime cast suffixes (::timestamp -> CAST(... AS TIMESTAMP)), nested dateadd(...) calls, and intervals (- interval '5 month') inside and outside control blocks using balanced-parentheses parsers.
        • Copyright Header Placement: Prepend the mandatory Google copyright header at the very top of the file above the config block.
    5. Write to the New BigQuery dbt File & Copy YAML Configurations:
      • Save the newly assembled, BigQuery-compatible files preserving directory structure. Also, copy all .yml/.yaml files from the input directory to the output directory.
  • Put a summary to the tasks file at the end.

  • Before handing over, ask for user approval for the outcome. Apply necessary changes from the user.

  • Mark your task is done in the tasks file.

Show full SKILL.md (319 more words)Show less

Mandates & Behavioral Rules

1. Mandatory File Header

Every translated file MUST start with the following exact header at the very top:

sql
# Copyright 2026 Google. This software is provided as-is, without warranty or
# representation for any use or purpose. Your use of it is subject to your
# agreement with Google.
2. Standardized JSON Extraction

Never use Snowflake colon notation or BigQuery JSON_VALUE. Always use the following pattern:

  • Rule: CAST(JSON_EXTRACT_SCALAR(json_column, '$.path') AS TYPE)
  • Mandatory Casting:
    • IDs (primary/foreign): AS INT64 for all system IDs (do not use NUMERIC for IDs).
    • Boolean Flags: AS BOOL
    • Strings: AS STRING (do not wrap in NULLIF unless explicitly required to handle empty/null strings in source).
    • Timestamps: AS TIMESTAMP
3. Explicit Type Safety
  • Comparisons: Always use CAST on both sides of a join or filter if types are not identical. Use AS STRING for universal comparison safety if necessary.
  • ID Fields: Prefer INT64 for all system IDs (e.g., ticket_id, user_id).
  • Null Handling:
    • For placeholder columns, always use explicit type casting: CAST(NULL AS TYPE).
4. Prescriptive String & Date Functions
  • Truncation: Use LEFT(col, length) or SUBSTR(col, 1, length).
  • Search: Use LOWER(col) LIKE '%pattern%' instead of REGEXP_CONTAINS.
  • Date Add: Use DATE_ADD(CAST(col AS DATETIME), INTERVAL num HOUR).
5. Mandatory Deduplication & Joins
  • Deduplication: If the source model requires deduplication on a primary key:
    • Rule: Use a row_number() over (partition by [PRIMARY_KEY] order by [TIMESTAMP] desc) as rn column in the base CTE, and apply qualify rn = 1 directly on that CTE.
  • Joins: Use LEFT JOIN when joining to custom field or attribute tables (e.g., exploded_array patterns) to prevent dropping records.
6. Preserve Jinja Constructs

Do not alter {{ config(...) }}, {{ ref(...) }}, or {{ source(...) }}. Keep {% if is_incremental() %} blocks functional. Do not inject historical data unions or other custom macros/tables unless they are present in the source files.

Outputs

You will output BigQuery-compatible dbt SQL models under migration_plan/[mig_prefix]/translated_models/. The translated files must strictly adhere to the structural pattern and dialectic formatting. For translation examples, see: dbt_migration_patterns.md

Constraints

Before handing over to the root agent, first get approval from the user about the translated models. After applying user's requests, then hand over the root agent.

© google, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in skills/cloud/dbt-sf-to-bq-translator of google/skills.

  • SKILL.md
  • references/dbt_migration_patterns.md
  • scripts/bulk_translate_via_gcloud.py
  • scripts/dbt_translator.py

Open the folder on GitHubat commit 4b940dd

Compare with similar skills

dbt Snowflake to BigQuery Translator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

dbt Snowflake to BigQuery Translator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
dbt Snowflake to BigQuery Translator this skillgoogle/skills21k—~2.7kAutomated safety check: PassApache-2.0
Snowflake Developmentsickn33/agentic-awesome-skills47k2 repos~2.1kAutomated safety check: PassMIT
Snowflake Developmentalirezarezvani/claude-skills28k—~3.2kAutomated safety check: PassMIT
Uipath Process MiningUiPath/skills167—~4.3kAutomated safety check: NotesMIT
SQL Queriesw95/awesome-claude-corporate-skills2443 repos~2.8kAutomated safety check: PassMIT
Imaging Data CommonsK-Dense-AI/scientific-agent-skills48k1 repos~7.8kAutomated safety check: PassMIT

Similar skills

  • Snowflake Development

    sickn33/agentic-awesome-skills

    Comprehensive Snowflake development assistant covering SQL best practices, data pipeline design (Dynamic Tables, Streams, Tasks, Snowpipe), Cortex AI functions, Cortex Agents, Snowpark Python, dbt…

    47k GitHub starsUsed in 2 repos~2.1k tokens
    DatabasesAuto-check passed
  • Snowflake Development

    alirezarezvani/claude-skills

    A skill your agent uses when writing Snowflake SQL, building data pipelines with Dynamic Tables or Streams/Tasks, using Cortex AI functions, creating Cortex Agents, writing Snowpark Python…

    28k GitHub stars~3.2k tokensUpdated 1 mo ago
    DatabasesAuto-check passed
  • UiPath Process Mining via uip pm — build and operate a process app end-to-end from a CSV / event log: templates, data mapping, upload, ingest, the dbt (Snowflake) transformation layer, publish, and…

    167 GitHub stars~4.3k tokensUpdated yesterday
    DatabasesAuto-check: notes
  • SQL Queries

    w95/awesome-claude-corporate-skills

    Write correct, performant SQL across all major data warehouse dialects (Snowflake, BigQuery, Databricks, PostgreSQL, etc.).

    244 GitHub starsUsed in 3 repos~2.8k tokens
    DatabasesAuto-check passed
  • Imaging Data Commons

    K-Dense-AI/scientific-agent-skills

    Queries and downloads public cancer imaging data from NCI Imaging Data Commons.

    48k GitHub starsUsed in 1 repo~7.8k tokens
    DatabasesAuto-check passed
  • Warehouse SQL

    HybridAIOne/hybridclaw

    Review and run read-only natural-language SQL against a customer data warehouse with cached schema introspection and explicit write grants.

    159 GitHub stars~1.8k tokensUpdated yesterday
    DatabasesAuto-check passed

More from google/skills

All 150 skills in this repo
  • Official

    Query Cloud Trace spans, filter by latency thresholds or error status, correlate distributed traces with Cloud Logging, and diagnose latency bottlenecks across Google Cloud services.

    21k GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Official

    Manages Google Cloud Privileged Access Manager entitlements and grants: create and edit entitlements, request temporary access, and approve or deny pending grants.

    21k GitHub stars~3.2k tokensUpdated yesterday
    Auto-check passed
  • Official

    Writes Terraform alerting policies for AI agents that emit OpenTelemetry metrics, covering reliability, cost, safety, security and quality signals on Google Cloud.

    21k GitHub stars~4.2k tokensUpdated yesterday
    Auto-check passed
  • Official

    Deploys open models or custom weights from Model Garden to Agent Platform endpoints, checks deployment status and cleans up endpoints, confirming before any change.

    21k GitHub stars~5k tokensUpdated yesterday
    Auto-check passed
  • Official

    Searches, manages and scaffolds skills in the Gemini Enterprise Agent Platform Skill Registry using bundled Python scripts and Google Cloud credentials.

    21k GitHub stars~584 tokensUpdated yesterday
    Auto-check passed
  • Designs GCP infrastructure as local Terraform, validates and scans it against best practices, then imports it to Application Design Center for deployment and troubleshooting.

    21k GitHub stars~4.4k tokensUpdated yesterday
    Auto-check passed

Questions about dbt Snowflake to BigQuery Translator

What does dbt Snowflake to BigQuery Translator do?

Translates Snowflake dbt SQL models into standardized BigQuery SQL, keeping Jinja constructs and tracking progress in a migration tasks file. This skill migrates Snowflake dbt models to Google BigQuery SQL. It handles SQL compilation, masks Jinja macro placeholders, uses the BigQuery Translation Service migration workflow, applies AST-based config transformations, and enforces house standards: a copyright header at the top of each file, explicit type casts, standardized JSON extraction, and deduplication with QUALIFY on _extracted_at.

When should I use dbt Snowflake to BigQuery Translator?

dbt Snowflake to BigQuery Translator fits situations like: migrating a Snowflake dbt project to BigQuery; converting individual dbt models while keeping Jinja macros intact; running bulk translations through the BigQuery Translation Service.

How do I install dbt Snowflake to BigQuery Translator in Claude Code?

Run `npx skills add google/skills --skill dbt-sf-to-bq-translator -a claude-code`. Or copy the skill folder (skills/cloud/dbt-sf-to-bq-translator in google/skills) into .claude/skills/dbt-sf-to-bq-translator in your project. Claude Code loads it when a task matches its description.

How do I install dbt Snowflake to BigQuery Translator in Codex?

Run `npx skills add google/skills --skill dbt-sf-to-bq-translator -a codex`. Or copy the skill folder (skills/cloud/dbt-sf-to-bq-translator in google/skills) into .agents/skills/dbt-sf-to-bq-translator in your project. Codex loads it when a task matches its description.

Can I use dbt Snowflake to BigQuery Translator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add google/skills --skill dbt-sf-to-bq-translator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dbt-sf-to-bq-translator, .gemini/skills/dbt-sf-to-bq-translator, .github/skills/dbt-sf-to-bq-translator and .opencode/skills/dbt-sf-to-bq-translator in your project.

What does dbt Snowflake to BigQuery Translator need to run?

Going by SKILL.md and its folder, dbt Snowflake to BigQuery Translator needs Python for the scripts in its folder and the command-line tools its instructions call (gcloud and python3). Our summary lists: Google Cloud SDK, authenticated with gcloud; A Google Cloud project with billing and the BigQuery, Migration and Storage APIs enabled; A GCS bucket for staging translation assets; Snowflake dbt SQL models as input.

Does dbt Snowflake to BigQuery Translator access the network?

SKILL.md names 2 domains. As links in the text: docs.cloud.google.com and cloud.google.com. This is read from the text; nothing was executed.

Is dbt Snowflake to BigQuery Translator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does dbt Snowflake to BigQuery Translator use?

dbt Snowflake to BigQuery Translator is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does dbt Snowflake to BigQuery Translator use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 634 tokens, read only when the agent opens those files.

What are the alternatives to dbt Snowflake to BigQuery Translator?

Skills that share tags, products or a category with dbt Snowflake to BigQuery Translator: Snowflake Development (sickn33/agentic-awesome-skills, 47k stars), Snowflake Development (alirezarezvani/claude-skills, 28k stars), Uipath Process Mining (UiPath/skills, 167 stars) and SQL Queries (w95/awesome-claude-corporate-skills, 244 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains dbt Snowflake to BigQuery Translator?

google (a GitHub organization, an official publisher) maintains it in google/skills, which has 21,097 GitHub stars. The repository holds 150 skills in this directory. The repository was last updated on October 9, 2026.

Source: google/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.