Creates a new data transfer configuration.
Scopes
You will need authorization for the https://www.googleapis.com/auth/cloud-platform scope to make a valid call.
If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-platform.
You can set the scope for this method like this: bigquerydatatransfer1 --scope <scope> projects transfer-configs-create ...
Required Scalar Argument
- <parent> (string)
- Required. The BigQuery project id where the transfer configuration should be created. Must be in the format projects/{project_id}/locations/{location_id} or projects/{project_id}. If specified location and location of the destination bigquery dataset do not match - the request will fail.
Required Request Value
The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.
For example, a structure like this:
TransferConfig:
data-refresh-window-days: integer
data-source-id: string
dataset-region: string
destination-dataset-id: string
disabled: boolean
display-name: string
email-preferences:
enable-failure-email: boolean
encryption-configuration:
kms-key-name: string
name: string
next-run-time: string
notification-pubsub-topic: string
owner-info:
email: string
schedule: string
schedule-options:
disable-auto-scheduling: boolean
end-time: string
start-time: string
state: string
update-time: string
user-id: string
can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.
-r . data-refresh-window-days=70
- 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 for just [today-1]. Only valid if the data source supports the feature. Set the value to 0 to use the default value.
- The number of days to look back to automatically refresh the data. For example, if
data-source-id=sed
- Data source ID. This cannot be changed once data transfer is created. The full list of available data source IDs can be returned through an API call: https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list
dataset-region=duo
- Output only. Region in which BigQuery dataset is located.
destination-dataset-id=dolore
- The BigQuery target dataset id.
disabled=false
- Is this config disabled. When set to true, no runs will be scheduled for this transfer config.
display-name=diam
- User specified display name for the data transfer.
-
email-preferences enable-failure-email=true
- If true, email notifications will be sent on transfer run failures.
-
..encryption-configuration kms-key-name=et
- The name of the KMS key used for encrypting BigQuery data.
-
.. name=et
- The resource name of the transfer config. Transfer config names have the form either
projects/{project_id}/locations/{region}/transferConfigs/{config_id}
orprojects/{project_id}/transferConfigs/{config_id}
, whereconfig_id
is usually a UUID, even though it is not guaranteed or required. The name is ignored when creating a transfer config.
- The resource name of the transfer config. Transfer config names have the form either
next-run-time=sadipscing
- Output only. Next time when data transfer will run.
notification-pubsub-topic=stet
- Pub/Sub topic where notifications will be sent after transfer runs associated with this transfer config finish. The format for specifying a pubsub topic is:
projects/{project_id}/topics/{topic_id}
- Pub/Sub topic where notifications will be sent after transfer runs associated with this transfer config finish. The format for specifying a pubsub topic is:
-
owner-info email=dolor
- E-mail address of the user.
-
.. schedule=duo
- 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
, andfirst 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.
- 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:
schedule-options disable-auto-scheduling=false
- If true, automatic scheduling of data transfer runs for this configuration will be disabled. The runs can be started on ad-hoc basis using StartManualTransferRuns API. When automatic scheduling is disabled, the TransferConfig.schedule field will be ignored.
end-time=vero
- 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. The time when a data transfer can be triggered manually is not limited by this option.
-
start-time=invidunt
- 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. The time when a data transfer can be triggered manually is not limited by this option.
-
.. state=stet
- Output only. State of the most recently updated transfer run.
update-time=vero
- Output only. Data transfer modification time. Ignored by server on input.
user-id=elitr
- Deprecated. Unique ID of the user on whose behalf transfer is done.
About Cursors
The cursor position is key to comfortably set complex nested structures. The following rules apply:
- The cursor position is always set relative to the current one, unless the field name starts with the
.
character. Fields can be nested such as in-r f.s.o
. - The cursor position is set relative to the top-level structure if it starts with
.
, e.g.-r .s.s
- You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify
-r struct.sub_struct=bar
. - You can move the cursor one level up by using
..
. Each additional.
moves it up one additional level. E.g....
would go three levels up.
Optional Output Flags
The method's return value a JSON encoded structure, which will be written to standard output by default.
- -o out
- out specifies the destination to which to write the server's result to.
It will be a JSON-encoded structure.
The destination may be
-
to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.
- out specifies the destination to which to write the server's result to.
It will be a JSON-encoded structure.
The destination may be
Optional Method Properties
You may set the following properties to further configure the call. Please note that -p
is followed by one
or more key-value-pairs, and is called like this -p k1=v1 k2=v2
even though the listing below repeats the
-p
for completeness.
-
-p authorization-code=string
- Optional OAuth2 authorization code to use with this transfer configuration. This is required only if
transferConfig.dataSourceId
is 'youtube_channel' and new credentials are needed, as indicated byCheckValidCreds
. In order to obtain authorization_code, make a request to the following URL: https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes * The client_id is the OAuth client_id of the a data source as returned by ListDataSources method. * data_source_scopes are the scopes returned by ListDataSources method. Note that this should not be set whenservice_account_name
is used to create the transfer config.
- Optional OAuth2 authorization code to use with this transfer configuration. This is required only if
-
-p service-account-name=string
- Optional service account email. If this field is set, the transfer config will be created with this service account's credentials. It requires that the requesting user calling this API has permissions to act as this service account. Note that not all data sources support service account credentials when creating a transfer config. For the latest list of data sources, read about using service accounts.
-
-p version-info=string
- Optional version info. This is required only if
transferConfig.dataSourceId
is not 'youtube_channel' and new credentials are needed, as indicated byCheckValidCreds
. In order to obtain version info, make a request to the following URL: https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes * The client_id is the OAuth client_id of the a data source as returned by ListDataSources method. * data_source_scopes are the scopes returned by ListDataSources method. Note that this should not be set whenservice_account_name
is used to create the transfer config.
- Optional version info. This is required only if
Optional General Properties
The following properties can configure any call, and are not specific to this method.
-
-p $-xgafv=string
- V1 error format.
-
-p access-token=string
- OAuth access token.
-
-p alt=string
- Data format for response.
-
-p callback=string
- JSONP
-
-p fields=string
- Selector specifying which fields to include in a partial response.
-
-p key=string
- API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
-
-p oauth-token=string
- OAuth 2.0 token for the current user.
-
-p pretty-print=boolean
- Returns response with indentations and line breaks.
-
-p quota-user=string
- Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
-
-p upload-type=string
- Legacy upload protocol for media (e.g. "media", "multipart").
-
-p upload-protocol=string
- Upload protocol for media (e.g. "raw", "multipart").