Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [bigquery-datatransfer]Add scheduleOptionsV2 and Error fields for TransferConfig #5722

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/google-cloud-bigquery-datatransfer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
1. [Select or create a Cloud Platform project][projects].
1. [Enable billing for your project][billing].
1. [Enable the Google BigQuery Data Transfer Service API][enable_api].
1. [Set up authentication with a service account][auth] so you can access the
1. [Set up authentication][auth] so you can access the
API from your local workstation.

### Installing the client library
Expand Down Expand Up @@ -189,4 +189,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
[projects]: https://console.cloud.google.com/project
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=bigquerydatatransfer.googleapis.com
[auth]: https://cloud.google.com/docs/authentication/getting-started
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,70 @@ message ScheduleOptions {
google.protobuf.Timestamp end_time = 2;
}

// V2 options customizing different types of data transfer schedule.
// This field supports existing time-based and manual transfer schedule. Also
// supports Event-Driven transfer schedule. ScheduleOptionsV2 cannot be used
// together with ScheduleOptions/Schedule.
message ScheduleOptionsV2 {
// Data transfer schedules.
oneof schedule {
// Time based transfer schedule options. This is the default schedule
// option.
TimeBasedSchedule time_based_schedule = 1;

// Manual transfer schedule. If set, the transfer run will not be
// auto-scheduled by the system, unless the client invokes
// StartManualTransferRuns. This is equivalent to
// disable_auto_scheduling = true.
ManualSchedule manual_schedule = 2;

// Event driven transfer schedule options. If set, the transfer will be
// scheduled upon events arrial.
EventDrivenSchedule event_driven_schedule = 3;
}
}

// Options customizing the time based transfer schedule.
// Options are migrated from the original ScheduleOptions message.
message TimeBasedSchedule {
// Data transfer schedule.
// If the data source does not support a custom schedule, this should be
// empty. If it is empty, the default value for the data source will be used.
// The specified times are in UTC.
// Examples of valid format:
// `1st,3rd monday of month 15:30`,
// `every wed,fri of jan,jun 13:15`, and
// `first sunday of quarter 00:00`.
// See more explanation about the format here:
// https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format
//
// NOTE: The minimum interval time between recurring transfers depends on the
// data source; refer to the documentation for your data source.
string schedule = 1;

// Specifies time to start scheduling transfer runs. The first run will be
// scheduled at or after the start time according to a recurrence pattern
// defined in the schedule string. The start time can be changed at any
// moment.
google.protobuf.Timestamp start_time = 2;

// Defines time to stop scheduling transfer runs. A transfer run cannot be
// scheduled at or after the end time. The end time can be changed at any
// moment.
google.protobuf.Timestamp end_time = 3;
}

// Options customizing manual transfers schedule.
message ManualSchedule {}

// Options customizing EventDriven transfers schedule.
message EventDrivenSchedule {
// Pub/Sub subscription name used to receive events.
// Only Google Cloud Storage data source support this option.
// Format: projects/{project}/subscriptions/{subscription}
string pubsub_subscription = 1;
}

// Information about a user.
message UserInfo {
// E-mail address of the user.
Expand Down Expand Up @@ -164,6 +228,11 @@ message TransferConfig {
// Options customizing the data transfer schedule.
ScheduleOptions schedule_options = 24;

// Options customizing different types of data transfer schedule.
// This field replaces "schedule" and "schedule_options" fields.
// ScheduleOptionsV2 cannot be used together with ScheduleOptions/Schedule.
ScheduleOptionsV2 schedule_options_v2 = 31;

// The number of days to look back to automatically refresh the data.
// For example, if `data_refresh_window_days = 10`, then every day
// BigQuery reingests data for [today-10, today-1], rather than ingesting data
Expand Down Expand Up @@ -215,6 +284,10 @@ message TransferConfig {
// applied in effect. Write methods will apply the key if it is present, or
// otherwise try to apply project default keys if it is absent.
EncryptionConfiguration encryption_configuration = 28;

// Output only. Error code with detailed information about reason of the
// latest config failure.
google.rpc.Status error = 32 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Represents the encryption configuration for a transfer.
Expand Down
Loading
Loading