GCP.BigQueryDataTransfer reference
StartManualRuns
Section titled “StartManualRuns”Source:
src/GCP/BigQueryDataTransfer/StartManualRuns.ts
Runtime binding for BigQuery Data Transfer transferConfigs.startManualRuns.
Starts one or more transfer runs for a TransferConfig. Bind this
operation in a Function/Action init phase. Provide
StartManualRunsHttp. requestedRunTime and requestedTimeRange
must be in the past.
Grants roles/bigquery.admin on the project because
bigquery.transfers.update (required by startManualRuns) is in no
narrower predefined role, and transfer configs have no resource-level
IAM or IAM Conditions support to scope it to the one config.
StartManualRuns: Starting Manual Runs
Section titled “StartManualRuns: Starting Manual Runs”const start = yield* GCP.BigQueryDataTransfer.StartManualRuns(nightly);const result = yield* start({ body: { requestedRunTime: "2020-01-01T00:00:00Z" },});StartManualRunsHttp
Section titled “StartManualRunsHttp”Source:
src/GCP/BigQueryDataTransfer/StartManualRunsHttp.tsKind: Layer · Provides:GCP.BigQueryDataTransfer.StartManualRuns
HTTP implementation of StartManualRuns.
TransferConfig
Section titled “TransferConfig”Source:
src/GCP/BigQueryDataTransfer/TransferConfig.ts
A BigQuery Data Transfer Service transfer configuration.
Transfer configs have no labels field — Alchemy stamps ownership into
the display name ([alchemy alchemy-stack=… alchemy-stage=… alchemy-id=…]) so read, list, and pnpm nuke:gcp can find them.
The physical id is a server-assigned UUID. dataSourceId and
location are immutable; changing either replaces the config.
TransferConfig: Creating a Transfer Config
Section titled “TransferConfig: Creating a Transfer Config”Scheduled query with auto-scheduling disabled
const dataset = yield* GCP.BigQuery.Dataset("Analytics", { location: "US-CENTRAL1", forceDestroy: true,});const nightly = yield* GCP.BigQueryDataTransfer.TransferConfig("Nightly", { dataSourceId: "scheduled_query", destinationDatasetId: dataset.datasetId, displayName: "nightly", schedule: "every 24 hours", scheduleOptions: { disableAutoScheduling: true }, params: { query: "SELECT 1 AS n", destination_table_name_template: "nightly", write_disposition: "WRITE_TRUNCATE", },});Cloud Storage load
const load = yield* GCP.BigQueryDataTransfer.TransferConfig("GcsLoad", { dataSourceId: "google_cloud_storage", destinationDatasetId: dataset.datasetId, schedule: "every 24 hours", scheduleOptions: { disableAutoScheduling: true }, params: { data_path_template: "gs://my-bucket/*.csv", destination_table_name_template: "events", file_format: "CSV", skip_leading_rows: "1", max_bad_records: "0", },});