Skip to content
Development
Skill

/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

From plugin
skills
25k200 skills2 MCP

Claude Code

$ npx -y skills add google/skills --skill bigquery-migration-data-exporter --agent claude-code

SKILL.md

bigquery-migration-data-exporter.SKILL.md
name: bigquery-migration-data-exporter
metadata:
  version: "1.0.0"
  category: BigDataAndAnalytics
  publisher: google
description: >-
  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

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](references/attribution.md).

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](https://cloud.google.com/sdk/docs/install) 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](https://cloud.google.com/about/locations)). Review [Google Cloud Pricing](https://cloud.google.com/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 ingestion (`bq load`) due to serializer discrepancies (for example, `VARIANT` JSON encoding, `CHAR(n)` fixed-width space padding, unbounded

Read more
@google
Ships withskills

This repository contains Agent Skills for Google products and technologies, including Google Cloud.

25k200 skills2 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
24.5k
Star history of google/skills on GitHub, a chart by star-history.com

Other skills on skills.

finding-google-skills

finding-google-skills

Google platform decision and setup guidance, loaded on demand from Google's skill catalog. Use when a developer is choosing or…

@google@googleInstall Skill
gcloud

gcloud

Provides safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform (GCP)…

@google@googleInstall Skill
google-cloud-recipe-auth

google-cloud-recipe-au…

Provides expert guidance on Identity and Access Management (IAM) and authenticating and authorizing to Google Cloud services and…

@google@googleInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills3w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc3w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2w252k
@facebook@facebookInstall Skill

Questions about bigquery-migration-data-exporter.

Which coding agents can use bigquery-migration-data-exporter?
bigquery-migration-data-exporter installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.