Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

bigquery-migration-data-exporter

БесплатноЗапускает вложенные скриптыНе проверен

Generates type-safe, schema-aligned database data export SQL files (.sql) for Snowflake, Databricks, Teradata, Oracle, and PostgreSQL directly from BigQuery…

googleот google★ 25 380 звёзд на GitHub

Об этом скилле

BigQuery Migration Data Exporter

This skill coordinates the generation of type-aware data export SQL scripts (.sql files) for source data warehouses (such as Snowflake, Databricks, Teradata, Oracle, and PostgreSQL) into target file formats (such as BigQuery-aligned Parquet files), guided by dialect and format specifications in the references/ directory.

All templates in this skill are pure SQL generators with zero JDBC or database connector dependencies.

[!TIP] Point directly to the BigQuery Migration Service (BQMS) translation_output/metadata directory (local path or Cloud Storage URI). It automatically discovers all physical tables and target BigQuery logical types from metadata/config/*.yaml.

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

  1. Google Cloud CLI & Project Setup: When reading translation outputs or metadata archives from gs:// Cloud Storage URIs, ensure the Google Cloud CLI is installed, verify that your Google Cloud project has an active Cloud Billing account attached, and configure the target project:

    gcloud config set project {project_id}
    
  2. Enable the API: When reading metadata from Cloud Storage (gs://), ask the user before enabling APIs, then enable the Cloud Storage API (storage.googleapis.com):

    gcloud services enable storage.googleapis.com
    
  3. Authentication & Required Identity and Access Management (IAM) Roles: Authenticate with gcloud auth login and gcloud auth application-default login (or set GOOGLE_APPLICATION_CREDENTIALS for service account authentication). Verify that your identity or service account has roles/storage.objectViewer (Storage Object Viewer) on any Cloud Storage bucket holding input metadata. Creating a staging bucket requires roles/storage.admin (Storage Admin) on the Google Cloud project, and deleting staged files requires roles/storage.objectAdmin (Storage Object Admin) on the staging bucket.

  4. Python Environment: The generator templates require Python 3.9 or later. Ask the user for confirmation before installing Python packages, then install PyYAML in a virtual environment (generator templates have zero JDBC or database connector dependencies):

    pip install pyyaml==6.0.2
    
  5. Region, Cost & Cleanup: Ask the user for confirmation before creating a new Cloud Storage bucket for staging exported Parquet files (gcloud storage buckets create gs://{bucket} --location={region}), and default to us-central1 unless your target BigQuery dataset uses another region (co-locate buckets with your dataset; see Google Cloud locations). Review Google Cloud Pricing before staging large exports. After BigQuery ingestion, temporary staged Parquet prefixes can be removed with gcloud storage rm -r gs://{bucket}/{export_prefix}. This deletion is permanent: run it only after the user explicitly confirms the exact URI, and never with an empty {export_prefix} (which would delete every object in the bucket).

  6. Snowflake Storage Integration: To unload Snowflake tables directly to a private Cloud Storage bucket (--stage-path 'gcs://...'), Snowflake requires a [storage integration][snowflake_gcs_integration] that grants its service account access to the bucket. Ask the user for the integration name and pass it with the --storage-integration flag, which adds a STORAGE_INTEGRATION clause to each generated COPY INTO statement. Unloads to a Snowflake stage (for example, @~/bqms_export/ or a named external stage) don't need this flag.


1. Direct Consumption of Translation Output Metadata

bigquery-migration-data-exporter consumes the native BigQuery Migration Service (BQMS) metadata translation output: translation_output/metadata/config/<database>/<schema>/<table_name>.yaml

Each configuration file specifies:

  1. sourceName: Fully qualified source table name.
  2. columns: Source data types, precision, scale, and BigQuery target types.
  3. Table versus view: A config with neither externalTableName nor externalTableDdlPath describes a view, which is recreated as a SQL view and isn't exported. The Databricks generator also honors an explicit TableType field when present.

2. Format-Guided Type-Safe Export Fundamentals

A plain unguided COPY INTO @stage FROM table or SELECT * often fails during BigQuery i

Полный SKILL.md на GitHub

Установить bigquery-migration-data-exporter в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

assets/export_databricks_tables_template.pyassets/export_oracle_tables_template.pyassets/export_postgres_tables_template.pyassets/export_snowflake_tables_template.pyassets/export_teradata_tables_template.pyreferences/attribution.mdreferences/databricks_parquet_mapping.mdreferences/oracle_parquet_mapping.mdreferences/postgres_parquet_mapping.mdreferences/snowflake_parquet_mapping.mdreferences/teradata_parquet_mapping.md

FAQ

Что делает скилл bigquery-migration-data-exporter?

Generates type-safe, schema-aligned database data export SQL files (.sql) for Snowflake, Databricks, Teradata, Oracle, and PostgreSQL directly from BigQuery Migration Service (BQMS) translation_output/metadata configs, exporting into target file formats (such as Parquet). Use when generating source database export SQL scripts for BigQuery ingestion without connecting to the source database. Don't use for executing SQL against source databases or streaming/staging exported files, extracting source database catalog metadata, translating SQL queries or DDL schemas (use bigquery-migration-sql-translator), loading staged Parquet files into BigQuery, or running post-migration data validation.

Как установить скилл bigquery-migration-data-exporter?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл bigquery-migration-data-exporter запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить bigquery-migration-data-exporter с