AIエージェントの遅延、エラー率、トークン使用量、安全性や応答品質を監視するアラートを設計し、既存設定との重複を確認してTerraformファイルにまとめるスキル。
- エージェントの遅延とエラー率の監視
- トークン消費の急増の監視
- 安全性の判定と権限拒否の監視
OracleやTeradataなどのSQLをBigQuery向けに変換します。単一クエリから複数ファイルやスキーマまで扱い、変換設定やエラー確認、修正の反復を支援します。
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).
実行スコア 未検証
インストール方法を見る既存データベースのSQLを、BigQueryで使うGoogleSQLへ変換します。BigQuery Migration Service(BQMS)のMCPサーバーを使い、クエリ、テーブル構造を定義するDDL、ストアドプロシージャを扱います。単一クエリの変換と、Cloud Storage経由の一括変換に対応し、YAMLでの変換設定やエラーの整理、修正後の再変換まで支援します。
Teradata、Oracle、Redshift、Snowflake、SparkSQL、HiveQLからBigQueryへSQL資産を移したい場合に向いています。複数ファイル間の依存関係や、構文だけでは見つけにくい処理結果の違いも確認したいときに役立ちます。
Google Cloud SDK、課金が有効なプロジェクト、BigQuery Migration API、BQMSのMCP接続と必要なIAM権限が前提です。一括変換にはCloud Storageも使います。変換完了だけで正しさを判断せず、ログ・出力SQL・可能な場合のドライランで確認します。残る問題は明示して扱います。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
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.
Before translating queries or schemas, verify the following prerequisites:
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}
Enable the API: Enable the BigQuery Migration API
(bigquerymigration.googleapis.com) in your Google Cloud project:
gcloud services enable bigquerymigration.googleapis.com
Required IAM Roles: Verify that your identity or service account has:
roles/mcp.toolUser (MCP Tool User)roles/bigquerymigration.editor (Migration Workflow Editor)roles/storage.objectViewer and
roles/storage.objectCreator (or roles/storage.objectAdmin) on the
Cloud Storage buckets that hold the input and output files.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.
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}
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.
Choose the workflow based on your migration scope:
.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.Use the interactive workflow to translate a single query string, inspect compiler logs, and iteratively resolve issues.
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,
schema redirection, optimizer rules). Show the YAML you used in your
response so the user can reuse it (e.g. in batch translation).Poll Status (get_translation): If the returned translation_state is
RUNNING or PENDING, poll get_translation using the translation ID,
projectNumber, and location until translation.state is SUCCEEDED or
FAILED, at the interval given in the BigQuery Migration Service (BQMS) MCP
tool descriptions. While the job runs, do work that doesn't need the result
(e.g. read the dialect gotchas reference).
Inspect Output & Logs:
translated_query for the converted GoogleSQL.translation_logs: inspect severity (ERROR,
WARNING), category (e.g. RelationNotFound), and effect
(CORRECTNESS, COMPLETENESS, COMPATIBILITY).ERROR_TYPE(...) for types it cannot map, sometimes with
no log entry. Treat any ERROR_TYPE or inline error comment as an
error, and when a BigQuery project is available, dry-run the result (bq query --dry_run --use_legacy_sql=false). A Not found or must be qualified with a dataset error still means the SQL is syntactically
valid; the referenced objects just don't exist in BigQuery yet. Say so
and move on, even if the error suggests a fix: don't stub tables or
change the SQL or bq flags to get past it.NoSuchFunction error means BigQuery Migration Service (BQMS) copied
that call unchanged, sometimes with the function name in backticks.
Treat it as untranslated even if BigQuery has a function with that name:
a dry run that stops at missing tables doesn't check it.Iterate Until Clean: If the logs contain errors or warnings, the
translated SQL contains ERROR_TYPE or inline error comments, the dry run
fails, or the output matches a dialect gotcha, resolve the issues as
described in Resolving Translation Issues
and re-translate.
Explain & Compare Differences (explain_translation): When requested to
explain a translation, compare syntax differences, or understand how
specific query logic was converted, call explain_translation with
translation (the translation ID), projectNumber, and location. This
returns a structured explanation of the query's purpose and a detailed
breakdown of syntax, function, and behavioral differences between the source
query and the translated GoogleSQL. The explanation doesn't validate the
output, so check the translation as in step 3 rather than relying on it.
Batch translation handles multiple files staged in Cloud Storage. It resolves
cross-file dependencies and produces a consolidated translation summary report
(translation_report.csv).
Stage Input Files to Cloud Storage: Upload the raw SQL files,
configuration files (*.config.yaml), and any metadata file from the local
workspace to a Cloud Storage input folder:
gcloud storage cp input/*.sql gs://my-bucket/migration/input/
gcloud storage cp *.config.yaml gs://my-bucket/migration/input/
Note: Do not pass configuration file paths in tool parameters if those
files are already located inside sourceBaseUri.
Use new, empty Cloud Storage input and output folders for each run (e.g. with a timestamp suffix). Stage only files from the local workspace or generated in this run. Never reuse or copy inputs, DDL, or outputs that are already in a bucket from earlier runs: they may come from different inputs or settings.
Initiate Batch Translation:
translate_batch_queries): Call
translate_batch_queries with projectNumber, location,
sourceDialect, targetDialect, sourceBaseUri, and targetBaseUri.translate_metadata): To aid batch
translation by generating target BigQuery DDL schema definitions from an
extracted database metadata zip file (metadata.zip from Teradata,
Oracle, etc.), call translate_metadata specifying sourceBaseUri
(Cloud Storage URI to metadata.zip) and targetBaseUri (destination
Cloud Storage folder).Poll Completion (fetch_batch_translation): Poll using the returned
workflow ID until translation.state is SUCCEEDED or FAILED, at the
interval given in the BigQuery Migration Service (BQMS) MCP tool
descriptions.
Retrieve & Inspect Outputs: Download the generated files from
translation.target_base_uri:
gcloud storage cp -r gs://my-bucket/migration/output/ ./local_output/
Locate and inspect report/translation_report.csv to review all warnings,
errors, and line-level diagnostics. Then scan the generated .sql files for
ERROR_TYPE(...) and inline error comments, which the report can miss, and
dry-run the generated SQL when a BigQuery project is available (handle Not found errors as in the interactive workflow). Check the output for the
patterns in the source dialect's gotchas reference, if one exists. Resolve
or clearly report every remaining issue; do not describe the output as clean
until this check passes.
Iterate Until Clean: Resolve the issues found in step 4 as described in Resolving Translation Issues, and re-run from step 1 with the changed inputs.
Post-processing (Final Step Only): Only after resolving every compiler error that re-translation can fix, execute any application-level post-processing (e.g. AST re-injection) to restore host source files. effect_correctness.md lists the errors that may remain when re-injecting embedded SQL.
Both workflows resolve issues the same way:
CORRECTNESS, COMPLETENESS, COMPATIBILITY) of
each issue, and resolve them in order of compiler phase dependencies:
CORRECTNESS (parse errors) first, then COMPLETENESS (missing objects),
then COMPATIBILITY (unsupported features).TOP, LIMIT)
can't be merged into the query before the limit.Use these reference guides when troubleshooting errors or authoring configuration files:
| Effect | Common Causes | Reference Guide |
|---|---|---|
CORRECTNESS | Syntax errors, unescaped literals, application script wrappers, NoSuchFunction. | effect_correctness.md |
COMPLETENESS | Missing tables, views, columns (RelationNotFound, AttributeNotFound), DDL suggestions. | effect_completeness.md |
COMPATIBILITY | Functions or features without direct GoogleSQL mapping. | effect_compatibility.md |
| Task | Description | Reference Guide |
|---|---|---|
| YAML Configurations | Database/schema redirection, name mapping, table partitioning and clustering injection, optimizer transformations, statement rewriters, and environment settings. Schemas in assets/translation_config_schemas/ and examples in assets/translation_config_examples/. | translation_yaml_config.md |
| MCP Server Setup | Configuring the remote BigQuery Migration Service (BQMS) MCP server, OAuth scopes, and IAM roles. | mcp_config.md |
| Dialect | Key Considerations | Reference Guide |
|---|---|---|
| Teradata | SET/MULTISET tables, SAMPLE clause, primary index mapping. | teradata_gotchas.md |
| Oracle | PL/SQL procedures, ROWNUM emulation, outer join (+), sequences. | oracle_gotchas.md |
| Snowflake | Dynamic templates, USE statements, metadata merging, lateral joins. | snowflake_gotchas.md |
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
AIエージェントの遅延、エラー率、トークン使用量、安全性や応答品質を監視するアラートを設計し、既存設定との重複を確認してTerraformファイルにまとめるスキル。
Model GardenのモデルをAgent Platformに配置し、対応構成と時間単価の確認から進行状況の確認、テスト呼び出し、利用後の撤去までを支援するスキル。
Agent Platformでモデルの予測リクエストを受け付けるエンドポイントを一覧・詳細確認、作成、更新、削除し、権限や割り当て上限のエラーを調べるスキル。
Google Cloud上のAIモデルやエージェントを評価し、テストデータ作成、採点指標の選定、失敗分析、修正前後の比較を通じて品質改善を支援します。
Google CloudのAgent PlatformでGeminiやLlamaなどに質問を送り、回答を得るための認証・接続コード作成と実行、エラー対処を支援するスキル。
Google AI StudioのGemini APIをGoogle Cloudへ移す手順を案内し、認証・権限・課金の設定からSDKやエージェントの接続変更まで支援します。