data_sources
Creates, updates, deletes, gets or lists a data_sources
resource.
Overview
Name | data_sources |
Type | Resource |
Id | google.bigquerydatatransfer.data_sources |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_data_sources_get
- projects_data_sources_get
- projects_locations_data_sources_list
- projects_data_sources_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Data source resource name. |
authorizationType | string | Indicates the type of authorization. |
clientId | string | Data source client id which should be used to receive refresh token. |
dataRefreshType | string | Specifies whether the data source supports automatic data refresh for the past few days, and how it's supported. For some data sources, data might not be complete until a few days later, so it's useful to refresh data automatically. |
dataSourceId | string | Data source id. |
defaultDataRefreshWindowDays | integer (int32) | Default data refresh window on days. Only meaningful when data_refresh_type = SLIDING_WINDOW . |
defaultSchedule | string | Default data transfer schedule. Examples of valid schedules include: 1st,3rd monday of month 15:30 , every wed,fri of jan,jun 13:15 , and first sunday of quarter 00:00 . |
description | string | User friendly data source description string. |
displayName | string | User friendly data source name. |
helpUrl | string | Url for the help document for this data source. |
manualRunsDisabled | boolean | Disables backfilling and manual run scheduling for the data source. |
minimumScheduleInterval | string (google-duration) | The minimum interval for scheduler to schedule runs. |
parameters | array | Data source parameters. |
scopes | array | Api auth scopes for which refresh token needs to be obtained. These are scopes needed by a data source to prepare data and ingest them into BigQuery, e.g., https://www.googleapis.com/auth/bigquery |
supportsCustomSchedule | boolean | Specifies whether the data source supports a user defined schedule, or operates on the default schedule. When set to true , user can override default schedule. |
supportsMultipleTransfers | boolean | Deprecated. This field has no effect. |
transferType | string | Deprecated. This field has no effect. |
updateDeadlineSeconds | integer (int32) | The number of seconds to wait for an update from the data source before the Data Transfer Service marks the transfer as FAILED. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Data source resource name. |
authorizationType | string | Indicates the type of authorization. |
clientId | string | Data source client id which should be used to receive refresh token. |
dataRefreshType | string | Specifies whether the data source supports automatic data refresh for the past few days, and how it's supported. For some data sources, data might not be complete until a few days later, so it's useful to refresh data automatically. |
dataSourceId | string | Data source id. |
defaultDataRefreshWindowDays | integer (int32) | Default data refresh window on days. Only meaningful when data_refresh_type = SLIDING_WINDOW . |
defaultSchedule | string | Default data transfer schedule. Examples of valid schedules include: 1st,3rd monday of month 15:30 , every wed,fri of jan,jun 13:15 , and first sunday of quarter 00:00 . |
description | string | User friendly data source description string. |
displayName | string | User friendly data source name. |
helpUrl | string | Url for the help document for this data source. |
manualRunsDisabled | boolean | Disables backfilling and manual run scheduling for the data source. |
minimumScheduleInterval | string (google-duration) | The minimum interval for scheduler to schedule runs. |
parameters | array | Data source parameters. |
scopes | array | Api auth scopes for which refresh token needs to be obtained. These are scopes needed by a data source to prepare data and ingest them into BigQuery, e.g., https://www.googleapis.com/auth/bigquery |
supportsCustomSchedule | boolean | Specifies whether the data source supports a user defined schedule, or operates on the default schedule. When set to true , user can override default schedule. |
supportsMultipleTransfers | boolean | Deprecated. This field has no effect. |
transferType | string | Deprecated. This field has no effect. |
updateDeadlineSeconds | integer (int32) | The number of seconds to wait for an update from the data source before the Data Transfer Service marks the transfer as FAILED. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Data source resource name. |
authorizationType | string | Indicates the type of authorization. |
clientId | string | Data source client id which should be used to receive refresh token. |
dataRefreshType | string | Specifies whether the data source supports automatic data refresh for the past few days, and how it's supported. For some data sources, data might not be complete until a few days later, so it's useful to refresh data automatically. |
dataSourceId | string | Data source id. |
defaultDataRefreshWindowDays | integer (int32) | Default data refresh window on days. Only meaningful when data_refresh_type = SLIDING_WINDOW . |
defaultSchedule | string | Default data transfer schedule. Examples of valid schedules include: 1st,3rd monday of month 15:30 , every wed,fri of jan,jun 13:15 , and first sunday of quarter 00:00 . |
description | string | User friendly data source description string. |
displayName | string | User friendly data source name. |
helpUrl | string | Url for the help document for this data source. |
manualRunsDisabled | boolean | Disables backfilling and manual run scheduling for the data source. |
minimumScheduleInterval | string (google-duration) | The minimum interval for scheduler to schedule runs. |
parameters | array | Data source parameters. |
scopes | array | Api auth scopes for which refresh token needs to be obtained. These are scopes needed by a data source to prepare data and ingest them into BigQuery, e.g., https://www.googleapis.com/auth/bigquery |
supportsCustomSchedule | boolean | Specifies whether the data source supports a user defined schedule, or operates on the default schedule. When set to true , user can override default schedule. |
supportsMultipleTransfers | boolean | Deprecated. This field has no effect. |
transferType | string | Deprecated. This field has no effect. |
updateDeadlineSeconds | integer (int32) | The number of seconds to wait for an update from the data source before the Data Transfer Service marks the transfer as FAILED. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Data source resource name. |
authorizationType | string | Indicates the type of authorization. |
clientId | string | Data source client id which should be used to receive refresh token. |
dataRefreshType | string | Specifies whether the data source supports automatic data refresh for the past few days, and how it's supported. For some data sources, data might not be complete until a few days later, so it's useful to refresh data automatically. |
dataSourceId | string | Data source id. |
defaultDataRefreshWindowDays | integer (int32) | Default data refresh window on days. Only meaningful when data_refresh_type = SLIDING_WINDOW . |
defaultSchedule | string | Default data transfer schedule. Examples of valid schedules include: 1st,3rd monday of month 15:30 , every wed,fri of jan,jun 13:15 , and first sunday of quarter 00:00 . |
description | string | User friendly data source description string. |
displayName | string | User friendly data source name. |
helpUrl | string | Url for the help document for this data source. |
manualRunsDisabled | boolean | Disables backfilling and manual run scheduling for the data source. |
minimumScheduleInterval | string (google-duration) | The minimum interval for scheduler to schedule runs. |
parameters | array | Data source parameters. |
scopes | array | Api auth scopes for which refresh token needs to be obtained. These are scopes needed by a data source to prepare data and ingest them into BigQuery, e.g., https://www.googleapis.com/auth/bigquery |
supportsCustomSchedule | boolean | Specifies whether the data source supports a user defined schedule, or operates on the default schedule. When set to true , user can override default schedule. |
supportsMultipleTransfers | boolean | Deprecated. This field has no effect. |
transferType | string | Deprecated. This field has no effect. |
updateDeadlineSeconds | integer (int32) | The number of seconds to wait for an update from the data source before the Data Transfer Service marks the transfer as FAILED. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_data_sources_get | select | projectsId , locationsId , dataSourcesId | Retrieves a supported data source and returns its settings. | |
projects_data_sources_get | select | projectsId , dataSourcesId | Retrieves a supported data source and returns its settings. | |
projects_locations_data_sources_list | select | projectsId , locationsId | pageToken , pageSize | Lists supported data sources and returns their settings. |
projects_data_sources_list | select | projectsId | pageToken , pageSize | Lists supported data sources and returns their settings. |
projects_enroll_data_sources | exec | projectsId | Enroll data sources in a user project. This allows users to create transfer configurations for these data sources. They will also appear in the ListDataSources RPC and as such, will appear in the BigQuery UI, and the documents can be found in the public guide for BigQuery Web UI and Data Transfer Service. | |
projects_data_sources_check_valid_creds | exec | projectsId , dataSourcesId | Returns true if valid credentials exist for the given data source and requesting user. | |
projects_locations_data_sources_check_valid_creds | exec | projectsId , locationsId , dataSourcesId | Returns true if valid credentials exist for the given data source and requesting user. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
dataSourcesId | string | |
locationsId | string | |
projectsId | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT
examples
- projects_locations_data_sources_get
- projects_data_sources_get
- projects_locations_data_sources_list
- projects_data_sources_list
Retrieves a supported data source and returns its settings.
SELECT
name,
authorizationType,
clientId,
dataRefreshType,
dataSourceId,
defaultDataRefreshWindowDays,
defaultSchedule,
description,
displayName,
helpUrl,
manualRunsDisabled,
minimumScheduleInterval,
parameters,
scopes,
supportsCustomSchedule,
supportsMultipleTransfers,
transferType,
updateDeadlineSeconds
FROM google.bigquerydatatransfer.data_sources
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND dataSourcesId = '{{ dataSourcesId }}' -- required;
Retrieves a supported data source and returns its settings.
SELECT
name,
authorizationType,
clientId,
dataRefreshType,
dataSourceId,
defaultDataRefreshWindowDays,
defaultSchedule,
description,
displayName,
helpUrl,
manualRunsDisabled,
minimumScheduleInterval,
parameters,
scopes,
supportsCustomSchedule,
supportsMultipleTransfers,
transferType,
updateDeadlineSeconds
FROM google.bigquerydatatransfer.data_sources
WHERE projectsId = '{{ projectsId }}' -- required
AND dataSourcesId = '{{ dataSourcesId }}' -- required;
Lists supported data sources and returns their settings.
SELECT
name,
authorizationType,
clientId,
dataRefreshType,
dataSourceId,
defaultDataRefreshWindowDays,
defaultSchedule,
description,
displayName,
helpUrl,
manualRunsDisabled,
minimumScheduleInterval,
parameters,
scopes,
supportsCustomSchedule,
supportsMultipleTransfers,
transferType,
updateDeadlineSeconds
FROM google.bigquerydatatransfer.data_sources
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}';
Lists supported data sources and returns their settings.
SELECT
name,
authorizationType,
clientId,
dataRefreshType,
dataSourceId,
defaultDataRefreshWindowDays,
defaultSchedule,
description,
displayName,
helpUrl,
manualRunsDisabled,
minimumScheduleInterval,
parameters,
scopes,
supportsCustomSchedule,
supportsMultipleTransfers,
transferType,
updateDeadlineSeconds
FROM google.bigquerydatatransfer.data_sources
WHERE projectsId = '{{ projectsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}';
Lifecycle Methods
- projects_enroll_data_sources
- projects_data_sources_check_valid_creds
- projects_locations_data_sources_check_valid_creds
Enroll data sources in a user project. This allows users to create transfer configurations for these data sources. They will also appear in the ListDataSources RPC and as such, will appear in the BigQuery UI, and the documents can be found in the public guide for BigQuery Web UI and Data Transfer Service.
EXEC google.bigquerydatatransfer.data_sources.projects_enroll_data_sources
@projectsId='{{ projectsId }}' --required
@@json=
'{
"dataSourceIds": "{{ dataSourceIds }}"
}';
Returns true if valid credentials exist for the given data source and requesting user.
EXEC google.bigquerydatatransfer.data_sources.projects_data_sources_check_valid_creds
@projectsId='{{ projectsId }}' --required,
@dataSourcesId='{{ dataSourcesId }}' --required;
Returns true if valid credentials exist for the given data source and requesting user.
EXEC google.bigquerydatatransfer.data_sources.projects_locations_data_sources_check_valid_creds
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@dataSourcesId='{{ dataSourcesId }}' --required;