dbt-sf-to-bq-translator
Was er macht
Dieser Skill überträgt dbt-Datenmodelle von Snowflake nach BigQuery auf Google Cloud. Gedacht ist das für Datenteams, die ihre dbt-Pipelines migrieren und wollen, dass die Ausgabe Googles Standards folgt.
Wann du ihn nutzt
- ✓Wenn du eine Snowflake-dbt-Pipeline oder ihre Modelle nach BigQuery migrierst.
- ✓Wenn du dbt-SQL aus Snowflake in BigQuery-SQL übersetzen musst und die Vorlagen erhalten bleiben sollen.
- ✓Wenn ein Migrationsplan den Fortschritt in einer Aufgabendatei verfolgt und du jeden Schritt beim Ausführen protokollieren willst.
Link zum Skill
https://github.com/google/skills/blob/main/skills/cloud/dbt-sf-to-bq-translator/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Wandle meine Snowflake-dbt-Modelle in diesem Ordner in BigQuery-SQL um und protokolliere den Fortschritt in meiner Migrationsaufgaben-Datei.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Er kompiliert das Snowflake-SQL, schützt die dbt-Jinja-Makros und übersetzt die Abfragen mit dem BigQuery-Migrationsdienst. Danach wendet er Google-Standards an, etwa Copyright-Kopfzeilen und explizite Typumwandlungen.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
dbt Snowflake to BigQuery Translator
You are responsible for:
- Dialect Translation: Translating Snowflake dbt SQL models to Standardized BigQuery SQL on Google Cloud.
- 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
QUALIFYwith_extracted_at. - 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.
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:dbt-sf-to-bq-translator)"
and append agent-skills/1.0 (skill:dbt-sf-to-bq-translator) to
User-Agent headers.
Prerequisites & Environment Setup
Before starting the translation, ensure your Google Cloud environment is properly configured:
- Google Cloud SDK: Install the Google Cloud SDK if not already installed.
- Authentication: Authenticate your CLI session:
gcloud auth login gcloud auth application-default login - Project Configuration: Set your active Google Cloud project:
gcloud config set project {project_id} - Billing Account: Verify that an active Google Cloud Billing account is attached to the target project.
- Enable Required APIs: Ensure BigQuery, Migration, and Storage services are enabled:
gcloud services enable bigquerymigration.googleapis.com storage.googleapis.com bigquery.googleapis.com - Region Selection: Configure your preferred compute/BigQuery region (default recommended:
us-central1orus). See Google Cloud Locations:gcloud config set compute/region us-central1
Steps
Initialization & Setup: If you do not have a defined
mig_prefixor if the user wants to start a new translation project, you MUST first ask the user for:- Migration Project Name (e.g.
my_migration_project). - Input directory containing Snowflake SQL files.
- Output directory where BigQuery SQL files should be saved.
- Cloud Storage bucket name for staging translation assets.
- Google Cloud region (e.g.
usoreu). - (Optional) Local path to a directory or
.zipfile containing source database metadata (such ascolumns.csvortables.csv). Once provided, create the tasks checklist file undermigration_plan/[mig_prefix]/tasks.mdwith unchecked tasks representing the migration steps.
- Migration Project Name (e.g.
Automated Execution via Bundled Scripts: Execute the deterministic end-to-end migration using the bundled translation script
scripts/bulk_translate_via_gcloud.py:python3 scripts/bulk_translate_via_gcloud.py \ --input {input_dir} \ --output {output_dir} \ --bucket {gcs_bucket} \ --location {region} \ [--metadata {metadata_path}] \ [--array-cast-mode {array_cast_mode}] \ [--struct-columns {struct_columns}]Flag Default Description --input(Required) Local directory containing source Snowflake dbt .sqland.ymlfiles.--output(Required) Target directory for translated BigQuery dbt .sqland.ymlfiles.--bucket(Required) Cloud Storage bucket name used to stage translation inputs and outputs. --locationusGoogle Cloud region for BigQuery Translation Service execution (e.g., us,eu).--metadataNoneOptional path to a directory or .ziparchive containing sourcetables.csvandcolumns.csv.--array-cast-modearray_stringTarget conversion for BQMS ARRAY<JSON>casts. Usearray_string(ARRAY<STRING>) by default; usestring(STRING),json_extract_string_array, orpreserveas escape hatches when required by the source table schema.`--struct-columns
Häufige Fragen
Behält er die dbt-Vorlagen bei?
Ja. Er behält die Jinja-Konstrukte bei und speichert die fertigen Modelle für BigQuery.
Wo wird der Fortschritt festgehalten?
In der Migrationsaufgaben-Datei, die er während der Arbeit aktualisiert.
Deckt er normale BigQuery-Abfragen ab?
Nein. Er dient der Migration von Snowflake-dbt-Modellen, nicht allgemeinen BigQuery-Abfragen.
Details
Originalbeschreibung des Autors
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 BigQuery on Google Cloud. Don't use for generic BigQuery queries or non-Snowflake SQL migrations.
repo: google/skills
Beliebtheit
- GitHub-Sterne
- 22k
- Platz im Ranking
- #10252
- Lizenz
- Apache-2.0
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
finding-google-skills
22kHilft deinem Agenten, die richtigen Google-Anleitungen für eine Einrichtungsaufgabe zu finden, etwa für Hosting, Datenbanken, Speicher, Anmeldung oder das Bereitstellen von KI-Modellen.
gcloud
22kHilft deinem Agenten, gcloud-Befehle für Google Cloud zu schreiben und zu prüfen, und schlägt die genaue Syntax nach, bevor etwas ausgeführt wird, damit keine Flags geraten werden.
google-cloud-recipe-auth
22kFührt deinen Agenten durch Identität und Zugriff in Google Cloud, einschließlich Anmeldung von Personen und Diensten und der Berechtigungen, die sie erhalten.
google-cloud-recipe-onboarding
22kFührt einen neuen Entwickler durch die ersten Schritte in Google Cloud, darunter Projektauswahl, Verknüpfung der Abrechnung und die Bereitstellung einer ersten Ressource.
Ähnliche Skills
discrawl
394kLässt deinen Agenten ein gespeichertes lokales Archiv von Discord-Nachrichten durchsuchen und zusammenfassen, dessen Aktualität prüfen und Direktnachrichten lesen.
clickhouse-io
280kHilft deinem Agenten, Abfragen und Schemas in ClickHouse zu optimieren. Nutzt Best Practices für schnelle Analyse-Workloads. Ideal, wenn Auswertungen zu langsam laufen.
scientific-db-pubmed-database
280kHilft deinem Agenten, wissenschaftliche Artikel im biomedizinischen Bereich zu suchen. Nützlich für Recherchen mit speziellen medizinischen Informationen.