GoogleBigqueryDataTransferConfig class final
Factory wrapper for google_bigquery_data_transfer_config.
Represents a data transfer configuration. A transfer configuration contains all metadata needed to perform a data transfer.
Manages a BigQuery Data Transfer Service (DTS) configuration — a
recurring import job that lands data into a BigQuery dataset from a
Google-owned source (scheduled_query, google_cloud_storage,
dcm_dt, google_ads, youtube_channel, ...) or a third-party
connector (amazon_s3, redshift, azure_blob_storage, ...). The
canonical reference for data_source_id values and the per-source
params map is the
DTS data-source catalog.
Required identity:
- localName: Terraform local name (the address segment after
google_bigquery_data_transfer_config.). displayName: human-readable label shown in the BigQuery UI.dataSourceId: the DTS data-source registry key. Free-formStringrather than a Dart enum because Google adds new connectors asynchronously and we do not want to pin a terradart release to the registry. Common values:"scheduled_query","google_cloud_storage","amazon_s3","redshift","google_ads","youtube_channel","dcm_dt".params: data-source-specific key/value bag. The expected keys depend on dataSourceId; see the doc table below for the three most common shapes.
params per data_source_id (canonical entries — consult the DTS
documentation for the complete schema of each source):
scheduled_query — re-runs a SQL query and writes the result to a
destination table:
final params = TfArg.literal(const {
'query':
'SELECT date, COUNT(*) AS n FROM `proj.ds.events` '
'WHERE date = @run_date GROUP BY date',
'destination_table_name_template': 'daily_event_counts_{run_date}',
'write_disposition': 'WRITE_APPEND', // or WRITE_TRUNCATE
'partitioning_field': '', // optional
});
google_cloud_storage — loads CSV / JSON / Avro / Parquet files from
a GCS prefix into a destination table:
final params = TfArg.literal(const {
'data_path_template': 'gs://my-bucket/exports/{run_date}/*.csv',
'destination_table_name_template': 'gcs_import_{run_date}',
'file_format': 'CSV', // CSV|JSON|AVRO|PARQUET|ORC
'field_delimiter': ',',
'skip_leading_rows': '1',
'write_disposition': 'WRITE_APPEND',
});
amazon_s3 — pulls files from an S3 prefix. The plaintext key id
goes in params, the secret key goes in sensitiveParams (the
provider rejects configurations that put the secret in params):
final params = TfArg.literal(const {
'data_path': 's3://my-bucket/exports/{run_date}/*.csv',
'destination_table_name_template': 's3_import_{run_date}',
'access_key_id': 'AKIAIOSFODNN7EXAMPLE',
'file_format': 'CSV',
});
final sensitiveParams = BigqueryDataTransferConfigSensitiveParams(
secretAccessKey: .secretAccessKeyWo(.literal(awsSecretAccessKey)),
secretAccessKeyWoVersion: .literal('1'),
);
Schedule shapes for schedule (App Engine cron syntax — the only
format DTS accepts):
"every 24 hours"/"every 6 hours"(fixed interval)"every day 03:00"(UTC, daily anchor)"first sunday of month 00:00"(calendar anchor)"1st,3rd monday of month 15:30"(multi-anchor)""(empty) — fall back to the data source's default cadence.
Manual-only mode: set scheduleOptions
disableAutoScheduling: .literal(true) to suppress the cron
entirely; runs must then be triggered via
transferConfigs.startManualRuns.
Credentials handling: the S3 secret access key MUST be placed in
sensitiveParams rather than params, as secretAccessKey:
.secretAccessKeyWo(...) (Terraform 1.11+; keeps the key out of
Terraform state, bump secretAccessKeyWoVersion to rotate) or
.secretAccessKey(...) (schema-flagged sensitive, but stored in
state).
Example (daily GCS → BigQuery import):
final dailyImport = GoogleBigqueryDataTransferConfig(
'daily_gcs_import',
displayName: TfArg.literal('Daily GCS export -> BigQuery'),
dataSourceId: TfArg.literal('google_cloud_storage'),
destinationDatasetId: analytics.ref,
location: TfArg.literal('US'),
schedule: TfArg.literal('every day 03:00'),
params: TfArg.literal(const {
'data_path_template':
'gs://exports-bucket/daily/{run_date}/*.csv',
'destination_table_name_template': 'gcs_import_{run_date}',
'file_format': 'CSV',
'field_delimiter': ',',
'skip_leading_rows': '1',
}),
emailPreferences: BigqueryDataTransferConfigEmailPreferences(
enableFailureEmail: TfArg.literal(true),
),
);
Constructors
-
GoogleBigqueryDataTransferConfig(String localName, {required TfArg<
String> displayName, required TfArg<String> dataSourceId, RefTo<GoogleBigqueryDataset> ? destinationDatasetId, TfArg<String> ? location, required TfArg<Map< params, TfArg<String, String> >String> ? schedule, BigqueryDataTransferConfigScheduleOptions? scheduleOptions, TfArg<bool> ? disabled, TfArg<String> ? serviceAccountName, TfArg<String> ? notificationPubsubTopic, BigqueryDataTransferConfigEmailPreferences? emailPreferences, BigqueryDataTransferConfigSensitiveParams? sensitiveParams, BigqueryDataTransferConfigEncryptionConfiguration? encryptionConfiguration, TfArg<num> ? dataRefreshWindowDays, TfArg<String> ? project, LifecycleOptions? lifecycle, List<TfAddressed> ? dependsOn, StackProvider? provider, TfTimeouts? timeouts})
Properties
-
argMap
→ Map<
String, TfArg?> -
Argument-name → TfArg map. Keys are snake_case (Terraform JSON name).
Synth emits these keys directly; the factory is responsible for the
camelCase → snake_case translation at construction time.
finalinherited
-
dataRefreshWindowDays
→ TfRef<
num> -
Reference to
data_refresh_window_daysattribute.no setter -
dataSourceId
→ TfRef<
String> -
Reference to
data_source_idattribute.no setter - defaultProvider → String
-
The provider name a block without provider uses: by default the
prefix of terraformType (
googleforgoogle_pubsub_topic).no setterinherited -
deletionPolicy
→ TfRef<
String> -
Reference to
deletion_policyattribute.no setter -
dependsOn
→ List<
TfAddressed> ? -
Optional
depends_on = [...]: the resources, data sources and module calls this block waits for, e.g.dependsOn: [api, ...apiDeps]. Terraform takes whole blocks only, so an entry is never an attribute.finalinherited -
destinationDatasetId
→ TfRef<
String> -
Reference to
destination_dataset_idattribute.no setter -
disabled
→ TfRef<
bool> -
Reference to
disabledattribute.no setter -
displayName
→ TfRef<
String> -
Reference to
display_nameattribute.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
-
id
→ TfRef<
String> -
Reference to
idattribute.no setter - kind → ResourceKind
-
Always
ResourceKind.resource. Overridden byData.no setterinherited - lifecycle → LifecycleOptions?
-
Optional
lifecycle { ... }block.finalinherited - localName → String
-
User-supplied local name within a Stack.
finalinherited
-
location
→ TfRef<
String> -
Reference to
locationattribute.no setter -
name
→ TfRef<
String> -
Reference to
nameattribute.no setter -
notificationPubsubTopic
→ TfRef<
String> -
Reference to
notification_pubsub_topicattribute.no setter -
params
→ TfRef<
Map< String, String> > -
Reference to
paramsattribute.no setter -
project
→ TfRef<
String> -
Reference to
projectattribute.no setter - provider → StackProvider?
-
Optional Terraform
providermeta-argument: the provider configuration this block uses, e.g. the aliasedGoogleProvider(alias: 'eu')the Stack registered withaddProvider.finalinherited -
ref
→ RefTo<
GoogleBigqueryDataTransferConfig> -
A reference to this resource, for arguments typed
RefTo<GoogleBigqueryDataTransferConfig>.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
schedule
→ TfRef<
String> -
Reference to
scheduleattribute.no setter -
sensitiveFields
→ Set<
String> -
Field names that are
@Sensitiveper the IR-derived per-resource constant. Curated factories override with a baked-instatic const Set<String>(file-private in v0.5+).no setteroverride -
serviceAccountName
→ TfRef<
String> -
Reference to
service_account_nameattribute.no setter - supportsDeletionProtection → bool
-
Capability flag: true when this resource's underlying Terraform
schema has a
deletion_protectionboolean attribute that the synth-time devMode flow can flip tofalse. Defaults to false; the codegen emitter overrides this totruefor wrappers whose schema includes the attribute.no setterinherited - terraformType → String
-
Terraform resource type, e.g.
google_pubsub_topic.finalinherited - tfAddress → String
-
Terraform address
<terraformType>.<localName>, e.g.google_pubsub_topic.orders.no setterinherited - timeouts → TfTimeouts?
-
Optional
timeouts { ... }block: how long Terraform waits for each operation. Provider-neutral like lifecycle — synth copies the duration strings verbatim, andterraform validatedecides whether this resource's schema declares the operations set here.finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited