DataTransferServiceClient(*, credentials: google.auth.credentials.Credentials = None, transport: Union[str, google.cloud.bigquery.datatransfer_v1.services.data_transfer_service.transports.base.DataTransferServiceTransport] = None, client_options: <module 'google.api_core.client_options' from '/workspace/python-bigquery-datatransfer/.nox/docfx/lib/python3.9/site-packages/google/api_core/client_options.py'> = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
The Google BigQuery Data Transfer Service API enables BigQuery users to configure the transfer of their data from other Google Products into BigQuery. This service contains methods that are end user exposed. It backs up the frontend.
Methods
DataTransferServiceClient
DataTransferServiceClient(*, credentials: google.auth.credentials.Credentials = None, transport: Union[str, google.cloud.bigquery.datatransfer_v1.services.data_transfer_service.transports.base.DataTransferServiceTransport] = None, client_options: <module 'google.api_core.client_options' from '/workspace/python-bigquery-datatransfer/.nox/docfx/lib/python3.9/site-packages/google/api_core/client_options.py'> = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
Instantiate the data transfer service client.
Name | Description |
credentials |
Optional[google.auth.credentials.Credentials]
The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. |
transport |
Union[str,
The transport to use. If set to None, a transport is chosen automatically. |
client_options |
ClientOptions
Custom options for the client. It won't take effect if a |
client_info |
google.api_core.gapic_v1.client_info.ClientInfo
The client info used to send a user-agent string along with API requests. If |
Type | Description |
google.auth.exceptions.MutualTLSChannelError | If mutual TLS transport creation failed for any reason. |
check_valid_creds
check_valid_creds(request: Optional[google.cloud.bigquery.datatransfer_v1.types.datatransfer.CheckValidCredsRequest] = None, *, name: Optional[str] = None, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Returns true if valid credentials exist for the given data source and requesting user. Some data sources doesn't support service account, so we need to talk to them on behalf of the end user. This API just checks whether we have OAuth token for the particular user, which is a pre-requisite before user can create a transfer config.
Name | Description |
request |
The request object. A request to determine whether the user has valid credentials. This method is used to limit the number of OAuth popups in the user interface. The user id is inferred from the API call context. If the data source has the Google+ authorization type, this method returns false, as it cannot be determined whether the credentials are already valid merely based on the user id. |
name |
Required. The data source in the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
| A response indicating whether the credentials exist and are valid. |
create_transfer_config
create_transfer_config(request: Optional[google.cloud.bigquery.datatransfer_v1.types.datatransfer.CreateTransferConfigRequest] = None, *, parent: Optional[str] = None, transfer_config: Optional[google.cloud.bigquery.datatransfer_v1.types.transfer.TransferConfig] = None, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Creates a new data transfer configuration.
Name | Description |
request |
The request object. A request to create a data transfer configuration. If new credentials are needed for this transfer configuration, an authorization code must be provided. If an authorization code is provided, the transfer configuration will be associated with the user id corresponding to the authorization code. Otherwise, the transfer configuration will be associated with the calling user. |
parent |
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. This corresponds to the |
transfer_config |
Required. Data transfer configuration to create. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
| Represents a data transfer configuration. A transfer configuration contains all metadata needed to perform a data transfer. For example, destination_dataset_id specifies where data should be stored. When a new transfer configuration is created, the specified destination_dataset_id is created when needed and shared with the appropriate data source service account. |
delete_transfer_config
delete_transfer_config(request: Optional[google.cloud.bigquery.datatransfer_v1.types.datatransfer.DeleteTransferConfigRequest] = None, *, name: Optional[str] = None, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Deletes a data transfer configuration, including any associated transfer runs and logs.
Name | Description |
request |
The request object. A request to delete data transfer information. All associated transfer runs and log messages will be deleted as well. |
name |
Required. The field will contain name of the resource requested, for example: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
delete_transfer_run
delete_transfer_run(request: Optional[google.cloud.bigquery.datatransfer_v1.types.datatransfer.DeleteTransferRunRequest] = None, *, name: Optional[str] = None, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Deletes the specified transfer run.
Name | Description |
request |
The request object. A request to delete data transfer run information. |
name |
Required. The field will contain name of the resource requested, for example: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
from_service_account_file
from_service_account_file(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Name | Description |
filename |
str
The path to the service account private key json file. |
Type | Description |
{@api.name} | The constructed client. |
from_service_account_json
from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Name | Description |
filename |
str
The path to the service account private key json file. |
Type | Description |
{@api.name} | The constructed client. |
get_data_source
get_data_source(request: Optional[google.cloud.bigquery.datatransfer_v1.types.datatransfer.GetDataSourceRequest] = None, *, name: Optional[str] = None, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Retrieves a supported data source and returns its settings, which can be used for UI rendering.
Name | Description |
request |
The request object. A request to get data source info. |
name |
Required. The field will contain name of the resource requested, for example: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
| Represents data source metadata. Metadata is sufficient to render UI and request proper OAuth tokens. |
get_transfer_config
get_transfer_config(request: Optional[google.cloud.bigquery.datatransfer_v1.types.datatransfer.GetTransferConfigRequest] = None, *, name: Optional[str] = None, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Returns information about a data transfer config.
Name | Description |
request |
The request object. A request to get data transfer information. |
name |
Required. The field will contain name of the resource requested, for example: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
| Represents a data transfer configuration. A transfer configuration contains all metadata needed to perform a data transfer. For example, destination_dataset_id specifies where data should be stored. When a new transfer configuration is created, the specified destination_dataset_id is created when needed and shared with the appropriate data source service account. |
get_transfer_run
get_transfer_run(request: Optional[google.cloud.bigquery.datatransfer_v1.types.datatransfer.GetTransferRunRequest] = None, *, name: Optional[str] = None, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Returns information about the particular transfer run.
Name | Description |
request |
The request object. A request to get data transfer run information. |
name |
Required. The field will contain name of the resource requested, for example: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
| Represents a data transfer run. |
list_data_sources
list_data_sources(request: Optional[google.cloud.bigquery.datatransfer_v1.types.datatransfer.ListDataSourcesRequest] = None, *, parent: Optional[str] = None, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Lists supported data sources and returns their settings, which can be used for UI rendering.
Name | Description |
request |
The request object. Request to list supported data sources and their data transfer settings. |
parent |
Required. The BigQuery project id for which data sources should be returned. Must be in the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
| Returns list of supported data sources and their metadata. Iterating over this object will yield results and resolve additional pages automatically. |
list_transfer_configs
list_transfer_configs(request: Optional[google.cloud.bigquery.datatransfer_v1.types.datatransfer.ListTransferConfigsRequest] = None, *, parent: Optional[str] = None, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Returns information about all data transfers in the project.
Name | Description |
request |
The request object. A request to list data transfers configured for a BigQuery project. |
parent |
Required. The BigQuery project id for which data sources should be returned: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
| The returned list of pipelines in the project. Iterating over this object will yield results and resolve additional pages automatically. |
list_transfer_logs
list_transfer_logs(request: Optional[google.cloud.bigquery.datatransfer_v1.types.datatransfer.ListTransferLogsRequest] = None, *, parent: Optional[str] = None, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Returns user facing log messages for the data transfer run.
Name | Description |
request |
The request object. A request to get user facing log messages associated with data transfer run. |
parent |
Required. Transfer run name in the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
| The returned list transfer run messages. Iterating over this object will yield results and resolve additional pages automatically. |
list_transfer_runs
list_transfer_runs(request: Optional[google.cloud.bigquery.datatransfer_v1.types.datatransfer.ListTransferRunsRequest] = None, *, parent: Optional[str] = None, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Returns information about running and completed jobs.
Name | Description |
request |
The request object. A request to list data transfer runs. UI can use this method to show/filter specific data transfer runs. The data source can use this method to request all scheduled transfer runs. |
parent |
Required. Name of transfer configuration for which transfer runs should be retrieved. Format of transfer configuration resource name is: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
| The returned list of pipelines in the project. Iterating over this object will yield results and resolve additional pages automatically. |
parse_transfer_config_path
parse_transfer_config_path(path: str)
Parse a transfer_config path into its component segments.
schedule_transfer_runs
schedule_transfer_runs(request: Optional[google.cloud.bigquery.datatransfer_v1.types.datatransfer.ScheduleTransferRunsRequest] = None, *, parent: Optional[str] = None, start_time: Optional[google.protobuf.timestamp_pb2.Timestamp] = None, end_time: Optional[google.protobuf.timestamp_pb2.Timestamp] = None, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Creates transfer runs for a time range [start_time, end_time]. For each date - or whatever granularity the data source supports
- in the range, one transfer run is created. Note that runs are created per UTC time in the time range. DEPRECATED: use StartManualTransferRuns instead.
Name | Description |
request |
The request object. A request to schedule transfer runs for a time range. |
parent |
Required. Transfer configuration name in the form: |
start_time |
Required. Start time of the range of transfer runs. For example, |
end_time |
Required. End time of the range of transfer runs. For example, |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
| A response to schedule transfer runs for a time range. |
start_manual_transfer_runs
start_manual_transfer_runs(request: Optional[google.cloud.bigquery.datatransfer_v1.types.datatransfer.StartManualTransferRunsRequest] = None, *, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Start manual transfer runs to be executed now with schedule_time equal to current time. The transfer runs can be created for a time range where the run_time is between start_time (inclusive) and end_time (exclusive), or for a specific run_time.
Name | Description |
request |
The request object. A request to start manual transfer runs. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
| A response to start manual transfer runs. |
transfer_config_path
transfer_config_path(project: str, transfer_config: str)
Return a fully-qualified transfer_config string.
update_transfer_config
update_transfer_config(request: Optional[google.cloud.bigquery.datatransfer_v1.types.datatransfer.UpdateTransferConfigRequest] = None, *, transfer_config: Optional[google.cloud.bigquery.datatransfer_v1.types.transfer.TransferConfig] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Updates a data transfer configuration. All fields must be set, even if they are not updated.
Name | Description |
request |
The request object. A request to update a transfer configuration. To update the user id of the transfer configuration, an authorization code needs to be provided. |
transfer_config |
Required. Data transfer configuration to create. This corresponds to the |
update_mask |
Required. Required list of fields to be updated in this request. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
| Represents a data transfer configuration. A transfer configuration contains all metadata needed to perform a data transfer. For example, destination_dataset_id specifies where data should be stored. When a new transfer configuration is created, the specified destination_dataset_id is created when needed and shared with the appropriate data source service account. |