본문으로 건너뛰기
Skillpedia
데이터베이스22k · #10227

bigquery-migration-sql-translator

하는 일

이 스킬은 오래된 시스템의 데이터베이스를 BigQuery로 옮기도록 돕습니다. 쿼리, 테이블 정의, 스크립트를 Google Cloud로 이전하는 팀을 위한 스킬입니다.

사용하는 경우

  • ✓Teradata, Oracle, Redshift, Snowflake 또는 Hive의 SQL 쿼리를 BigQuery로 옮길 때.
  • ✓데이터베이스 스키마나 메타데이터 아카이브를 BigQuery로 옮겨야 할 때.
  • ✓BigQuery 마이그레이션을 위해 일괄 번역 설정을 구성해야 할 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/google/skills/blob/main/skills/cloud/bigquery-migration-sql-translator/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Oracle 저장 프로시저와 쿼리를 BigQuery SQL로 변환하고, 깔끔하게 옮겨지지 않은 부분을 알려 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

BigQuery Migration Service로 스크립트와 스키마를 번역합니다. 파일은 Cloud Storage에 준비하고, 보고된 컴파일러 오류를 고치는 것을 도와줍니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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
자주 묻는 질문

API를 켜야 하나요?

네. 번역 전에 프로젝트에서 BigQuery Migration API를 활성화해야 합니다.

어떤 기존 시스템을 지원하나요?

Teradata, Oracle, Redshift, Snowflake, SparkSQL, HiveQL을 지원합니다.

추가 권한이 필요한가요?

네. MCP tool user 역할과 migration editor 역할이 필요하며, 일괄 작업에는 스토리지 역할도 필요합니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
22k
순위
#10227
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬