Skip to content

Commit

Permalink
Add notificationPubsubTopic to BigQuery Data Transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
14kw committed Aug 20, 2020
1 parent bc1edfd commit 90d1626
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions products/bigquerydatatransfer/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ objects:
about the format here:
https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format
NOTE: the granularity should be at least 8 hours, or less frequent.
- !ruby/object:Api::Type::String
name: 'notificationPubsubTopic'
description: |
Pub/Sub topic where notifications will be sent after transfer runs
associated with this transfer config finish.
- !ruby/object:Api::Type::Integer
name: 'dataRefreshWindowDays'
description: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ resource "google_bigquery_dataset" "my_dataset" {
location = "asia-northeast1"
}
resource "google_pubsub_topic" "my_topic" {
name = "my_topic"
}
resource "google_bigquery_data_transfer_config" "query_config" {
depends_on = [google_project_iam_member.permissions]
Expand All @@ -172,6 +176,7 @@ resource "google_bigquery_data_transfer_config" "query_config" {
data_source_id = "scheduled_query"
schedule = "%s sunday of quarter 00:00"
destination_dataset_id = google_bigquery_dataset.my_dataset.dataset_id
notification_pubsub_topic = google_pubsub_topic.my_topic.id
params = {
destination_table_name_template = "my_table"
write_disposition = "WRITE_APPEND"
Expand Down

0 comments on commit 90d1626

Please sign in to comment.