Pular para o conteúdo
Skillpedia
Bancos de dados22 mil · #10227

bigquery-migration-sql-translator

O que ela faz

Esta skill ajuda a mover bancos de dados de sistemas antigos para o BigQuery. É para equipes que migram consultas, definições de tabelas e scripts para o Google Cloud.

Quando usar

  • ✓Quando você estiver movendo consultas SQL do Teradata, Oracle, Redshift, Snowflake ou Hive para o BigQuery.
  • ✓Quando precisar migrar um schema de banco de dados ou um arquivo de metadados para o BigQuery.
  • ✓Quando precisar configurar as opções de tradução em lote para uma migração para o BigQuery.

Link da skill

https://github.com/google/skills/blob/main/skills/cloud/bigquery-migration-sql-translator/SKILL.md

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/google/skills/blob/main/skills/cloud/bigquery-migration-sql-translator/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Converta meus stored procedures e consultas do Oracle para SQL do BigQuery e me diga o que não foi traduzido corretamente.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

Ela usa o BigQuery Migration Service para traduzir scripts e schemas. Organiza os arquivos no Cloud Storage e ajuda você a corrigir os erros de compilação que forem reportados.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do GitHub.

BigQuery Migration Service (BQMS) SQL Translator

The BigQuery Migration Service (BQMS) translates legacy database SQL scripts, queries, and schemas into GoogleSQL. This skill coordinates translation workflows, Cloud Storage staging, compiler error triage, and YAML configuration.

Usage Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read and follow the instructions in Usage Attribution.

Before you begin

Before translating queries or schemas, verify the following prerequisites:

  1. Google Cloud SDK & Project Setup: Ensure the Google Cloud SDK is installed, verify that your Google Cloud project has an active Cloud Billing account attached, and select the target project:

    gcloud config set project {project_id}
    
  2. Enable the API: Enable the BigQuery Migration API (bigquerymigration.googleapis.com) in your Google Cloud project:

    gcloud services enable bigquerymigration.googleapis.com
    
  3. Required IAM Roles: Verify that your identity or service account has:

    • roles/mcp.toolUser (MCP Tool User)
    • roles/bigquerymigration.editor (Migration Workflow Editor)
    • For batch translation, roles/storage.objectViewer and roles/storage.objectCreator (or roles/storage.objectAdmin) on the Cloud Storage buckets that hold the input and output files.
  4. MCP Server Connection: If BigQuery Migration Service (BQMS) tools (e.g. translate_query, translate_batch_queries) are not present in your active tool list, configure the remote BigQuery Migration Service (BQMS) MCP server. For setup instructions across clients (Claude, Cursor, Gemini CLI, VS Code), see mcp_config.md.

  5. Cost & Cloud Storage Cleanup: Review Google Cloud Pricing for Cloud Storage and BigQuery usage details. After completing a batch migration, clean up temporary staged input and output folders in Cloud Storage:

    gcloud storage rm -r gs://{bucket}/{folder}
    
  6. Translation Tracking: For batch translations, and for queries that need more than one translation iteration, keep a translation tracker (e.g. translation_tracker.md) to document goals, planned steps, and progress. After each translation, record one row with this template:

    Iteration Status Total Errors Correctness Errors Completeness Errors Compatibility Errors Key Actions / Transformations

    A single query that translates cleanly on the first attempt needs no tracker: report its translation ID and logs in your response.

Workflow Selection

Choose the workflow based on your migration scope:

  • Interactive Translation (Single Query): Best for ad-hoc queries, exploratory testing, dialect syntax comparison, or quick error debugging.
  • Batch Translation (Multiple Files & Cloud Storage): Use for more than one file or a directory, including SQL embedded in application code (extract it into .sql files first). For multi-file Python codebases containing embedded SQL, use python_embedded_sql_migrator_template.py to extract queries into staged files and re-inject translated SQL. Batch translation is faster and cheaper than translating files one by one, and it resolves cross-file dependencies, so it usually gives better results. Run translate_batch_queries on the staged files first; use translate_query only afterwards if needed to debug a specific statement from translation_report.csv.

1. Interactive Translation Workflow

Use the interactive workflow to translate a single query string, inspect compiler logs, and iteratively resolve issues.

Steps

  1. Submit Query (translate_query): Call translate_query with projectNumber, location, inputQuery, sourceDialect, and targetDialect (BigQuery). Include optional parameters:

    • metadataFilePath: Cloud Storage URI to a metadata zip file (gs://.../metadata.zip) for schema resolution.
    • translationConfigs: Inline YAML configurations (e.g. object renaming, s
Perguntas frequentes

Preciso ativar uma API?

Sim. A BigQuery Migration API precisa estar ativada no seu projeto antes da tradução.

Quais sistemas antigos ela suporta?

Ela lista Teradata, Oracle, Redshift, Snowflake, SparkSQL e HiveQL.

Preciso de permissões extras?

Sim. Ela precisa dos papéis de usuário da ferramenta MCP e de editor de migração, além de papéis de armazenamento para os jobs em lote.

Detalhes

Descrição original do autor

Translates SQL queries, DDL schemas, and stored procedures from legacy database dialects (Teradata, Oracle, Redshift, Snowflake, SparkSQL, HiveQL) to BigQuery GoogleSQL using the BigQuery Migration Service (BQMS) MCP server. Use when translating legacy SQL queries, migrating schemas or metadata zip archives, or configuring BigQuery Migration Service (BQMS) YAML translation settings. Don't use for executing BigQuery queries or managing datasets and tables (use bigquery-basics), diagnosing runtime job errors (use bigquery-troubleshooting), or tuning slot reservations (use bigquery-optimization).

repo: google/skills

Popularidade

Estrelas no GitHub
22 mil
Posição no ranking
#10227
Licença
Apache-2.0
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas