Command Palette

Search for a command to run...

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

bigquery-migration-data-loader

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

Provisions BigQuery datasets, ingests staged Parquet files directly into native BigQuery tables by using bq load, and deploys already-translated views from…

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

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

BigQuery Migration Data Loader

This skill coordinates the automated provisioning of BigQuery datasets, direct ingestion of staged Parquet files into native BigQuery tables by using the bq load command, and automated view deployment directly from BigQuery Migration Service (BQMS) translation output directories (local or Cloud Storage).

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, and location setup: Install the Google Cloud CLI (including the gcloud and bq command-line tools), confirm that your Google Cloud project has an active Cloud Billing account attached, and configure the target project and default Compute Engine region:

    gcloud config set project PROJECT_ID
    gcloud config set compute/region REGION
    

    gcloud config set compute/region sets the default Compute Engine region; the bq CLI does not read compute/region and defaults to US unless --location is passed on bq commands or set in ~/.bigqueryrc (or configured through a project or organization default_location). BigQuery is retiring the multi-region designation—including US and EU in the single-regions list colocated with us-central1 and europe-west4, with no change to existing data residency (see BigQuery locations)—so always pass an explicit --location on bq commands that matches your staged Cloud Storage bucket, as described in step 5 (check regional service availability at Google Cloud locations).

  2. Enable the APIs: Ask the user before enabling APIs, then enable the BigQuery and Cloud Storage APIs (bigquery.googleapis.com and storage.googleapis.com):

    gcloud services enable bigquery.googleapis.com storage.googleapis.com
    
  3. Authentication and required 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 the required IAM roles on each resource:

    • Grant BigQuery Job User (roles/bigquery.jobUser) on the target Google Cloud project.
    • Grant BigQuery Data Editor (roles/bigquery.dataEditor) on the target Google Cloud project (to create new datasets with bq mk) or on an existing target dataset (to create or overwrite tables and views).
    • Grant Storage Object Viewer (roles/storage.objectViewer) on the Cloud Storage bucket holding staged Parquet files and translation metadata.
  4. Python environment: Ask the user for confirmation before installing Python packages, then install PyYAML in a virtual environment:

    pip install pyyaml==6.0.2
    
  5. Location, cost, and cleanup: Use the location of your staged Cloud Storage bucket for the dataset and every bq command: the bucket's region for a regional bucket, or US or EU for a US or EU multi-region bucket. Default to us-central1 only when you also choose the bucket location. Loading from a bucket in a different location incurs data transfer charges (see BigQuery locations). Review Google Cloud pricing before loading large datasets or running audit queries. Ask the user for confirmation before deleting temporary staged Parquet files (gcloud storage rm -r gs://BUCKET/EXPORT_PREFIX) or test datasets (bq rm -r -f PROJECT_ID:DATASET_ID) when no longer needed.


1. Loader workflow overview

The following diagram illustrates the four-stage ingestion and view deployment pipeline:

flowchart TD
    subgraph 1. Inputs
        A1["Translation Output Directory / Cloud Storage URI<br>gs://bucket/translation_output/metadata/"]
        A2["Staged Parquet Files<br>gs://bucket/data_unload/TABLE/*.parquet"]
    end

    subgraph 2. Ingestion Pipeline
        B1["1. Ensure Dataset Exists<br>bq mk --dataset --location=LOCATION DATASET"]
        B2["2. Concurrent Parquet Ingestion<br>bq load --source_format=PARQUET --replace=true<br>Auto-creates native tables"]
        B3["3. Row Count Audit<br>Print BigQuery Row Counts for Comparison"]
        B4["4. Deploy Consumption Views<br>Deploys views directly from consolidated views.sql or relations/"]
    end

    A1 & A2 --> B1 --> B2 --> B3 --> B4

2. Direct tr

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

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

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

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

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

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

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

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

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

assets/bq_loader_template.pyreferences/attribution.md

FAQ

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

Provisions BigQuery datasets, ingests staged Parquet files directly into native BigQuery tables by using bq load, and deploys already-translated views from local or Cloud Storage BigQuery Migration Service (BQMS) translation outputs. Use when provisioning target BigQuery datasets for warehouse migrations, batch loading staged Parquet files into native BigQuery tables by using bq load, auditing loaded table row counts, or deploying already-translated BigQuery views into a target dataset. Don't use for extracting source database catalog metadata, translating SQL queries, views, stored procedures, or DDL schemas to GoogleSQL (use bigquery-migration-sql-translator), exporting or unloading source database tables (such as Snowflake, Databricks, Teradata, or Oracle) to Parquet on Cloud Storage, or running post-migration cross-database data validation.

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

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

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

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

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

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