Constructor
new DataTransferServiceClient(optionsopt)
Construct an instance of DataTransferServiceClient.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
The configuration object. See the subsequent parameters for more details. Properties
|
Members
(static) apiEndpoint
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
(static) port
The port for this API service.
(static) scopes
The scopes needed to make gRPC calls for every method defined in this service.
(static) servicePath
The DNS address for this API service.
Methods
checkValidCreds(request, optionsopt, callbackopt) → {Promise}
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.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing CheckValidCredsResponse. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
const formattedName = client.projectDataSourcePath('[PROJECT]', '[DATA_SOURCE]');
client.checkValidCreds({name: formattedName})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
createTransferConfig(request, optionsopt, callbackopt) → {Promise}
Creates a new data transfer configuration.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing TransferConfig. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
const formattedParent = client.projectPath('[PROJECT]');
const transferConfig = {};
const request = {
parent: formattedParent,
transferConfig: transferConfig,
};
client.createTransferConfig(request)
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
deleteTransferConfig(request, optionsopt, callbackopt) → {Promise}
Deletes a data transfer configuration, including any associated transfer runs and logs.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
const formattedName = client.projectTransferConfigPath('[PROJECT]', '[TRANSFER_CONFIG]');
client.deleteTransferConfig({name: formattedName}).catch(err => {
console.error(err);
});
deleteTransferRun(request, optionsopt, callbackopt) → {Promise}
Deletes the specified transfer run.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
const formattedName = client.projectRunPath('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]');
client.deleteTransferRun({name: formattedName}).catch(err => {
console.error(err);
});
getDataSource(request, optionsopt, callbackopt) → {Promise}
Retrieves a supported data source and returns its settings, which can be used for UI rendering.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing DataSource. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
const formattedName = client.projectDataSourcePath('[PROJECT]', '[DATA_SOURCE]');
client.getDataSource({name: formattedName})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
getProjectId(callback)
Return the project ID used by this class.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function |
the callback to be called with the current project Id. |
getTransferConfig(request, optionsopt, callbackopt) → {Promise}
Returns information about a data transfer config.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing TransferConfig. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
const formattedName = client.projectTransferConfigPath('[PROJECT]', '[TRANSFER_CONFIG]');
client.getTransferConfig({name: formattedName})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
getTransferRun(request, optionsopt, callbackopt) → {Promise}
Returns information about the particular transfer run.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing TransferRun. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
const formattedName = client.projectRunPath('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]');
client.getTransferRun({name: formattedName})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
listDataSources(request, optionsopt, callbackopt) → {Promise}
Lists supported data sources and returns their settings, which can be used for UI rendering.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is Array of DataSource. When autoPaginate: false is specified through options, it contains the result in a single response. If the response indicates the next page exists, the third parameter is set to be used for the next request object. The fourth parameter keeps the raw response object of an object representing ListDataSourcesResponse. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
// Iterate over all elements.
const formattedParent = client.projectPath('[PROJECT]');
client.listDataSources({parent: formattedParent})
.then(responses => {
const resources = responses[0];
for (const resource of resources) {
// doThingsWith(resource)
}
})
.catch(err => {
console.error(err);
});
// Or obtain the paged response.
const formattedParent = client.projectPath('[PROJECT]');
const options = {autoPaginate: false};
const callback = responses => {
// The actual resources in a response.
const resources = responses[0];
// The next request if the response shows that there are more responses.
const nextRequest = responses[1];
// The actual response object, if necessary.
// const rawResponse = responses[2];
for (const resource of resources) {
// doThingsWith(resource);
}
if (nextRequest) {
// Fetch the next page.
return client.listDataSources(nextRequest, options).then(callback);
}
}
client.listDataSources({parent: formattedParent}, options)
.then(callback)
.catch(err => {
console.error(err);
});
listDataSourcesStream(request, optionsopt) → {Stream}
Equivalent to listDataSources, but returns a NodeJS Stream object.
This fetches the paged responses for listDataSources continuously and invokes the callback registered for 'data' event for each element in the responses.
The returned object has 'end' method when no more elements are required.
autoPaginate option will be ignored.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
const formattedParent = client.projectPath('[PROJECT]');
client.listDataSourcesStream({parent: formattedParent})
.on('data', element => {
// doThingsWith(element)
}).on('error', err => {
console.log(err);
});
listTransferConfigs(request, optionsopt, callbackopt) → {Promise}
Returns information about all data transfers in the project.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is Array of TransferConfig. When autoPaginate: false is specified through options, it contains the result in a single response. If the response indicates the next page exists, the third parameter is set to be used for the next request object. The fourth parameter keeps the raw response object of an object representing ListTransferConfigsResponse. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
// Iterate over all elements.
const formattedParent = client.projectPath('[PROJECT]');
client.listTransferConfigs({parent: formattedParent})
.then(responses => {
const resources = responses[0];
for (const resource of resources) {
// doThingsWith(resource)
}
})
.catch(err => {
console.error(err);
});
// Or obtain the paged response.
const formattedParent = client.projectPath('[PROJECT]');
const options = {autoPaginate: false};
const callback = responses => {
// The actual resources in a response.
const resources = responses[0];
// The next request if the response shows that there are more responses.
const nextRequest = responses[1];
// The actual response object, if necessary.
// const rawResponse = responses[2];
for (const resource of resources) {
// doThingsWith(resource);
}
if (nextRequest) {
// Fetch the next page.
return client.listTransferConfigs(nextRequest, options).then(callback);
}
}
client.listTransferConfigs({parent: formattedParent}, options)
.then(callback)
.catch(err => {
console.error(err);
});
listTransferConfigsStream(request, optionsopt) → {Stream}
Equivalent to listTransferConfigs, but returns a NodeJS Stream object.
This fetches the paged responses for listTransferConfigs continuously and invokes the callback registered for 'data' event for each element in the responses.
The returned object has 'end' method when no more elements are required.
autoPaginate option will be ignored.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
const formattedParent = client.projectPath('[PROJECT]');
client.listTransferConfigsStream({parent: formattedParent})
.on('data', element => {
// doThingsWith(element)
}).on('error', err => {
console.log(err);
});
listTransferLogs(request, optionsopt, callbackopt) → {Promise}
Returns user facing log messages for the data transfer run.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is Array of TransferMessage. When autoPaginate: false is specified through options, it contains the result in a single response. If the response indicates the next page exists, the third parameter is set to be used for the next request object. The fourth parameter keeps the raw response object of an object representing ListTransferLogsResponse. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
// Iterate over all elements.
const formattedParent = client.projectRunPath('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]');
client.listTransferLogs({parent: formattedParent})
.then(responses => {
const resources = responses[0];
for (const resource of resources) {
// doThingsWith(resource)
}
})
.catch(err => {
console.error(err);
});
// Or obtain the paged response.
const formattedParent = client.projectRunPath('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]');
const options = {autoPaginate: false};
const callback = responses => {
// The actual resources in a response.
const resources = responses[0];
// The next request if the response shows that there are more responses.
const nextRequest = responses[1];
// The actual response object, if necessary.
// const rawResponse = responses[2];
for (const resource of resources) {
// doThingsWith(resource);
}
if (nextRequest) {
// Fetch the next page.
return client.listTransferLogs(nextRequest, options).then(callback);
}
}
client.listTransferLogs({parent: formattedParent}, options)
.then(callback)
.catch(err => {
console.error(err);
});
listTransferLogsStream(request, optionsopt) → {Stream}
Equivalent to listTransferLogs, but returns a NodeJS Stream object.
This fetches the paged responses for listTransferLogs continuously and invokes the callback registered for 'data' event for each element in the responses.
The returned object has 'end' method when no more elements are required.
autoPaginate option will be ignored.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
const formattedParent = client.projectRunPath('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]');
client.listTransferLogsStream({parent: formattedParent})
.on('data', element => {
// doThingsWith(element)
}).on('error', err => {
console.log(err);
});
listTransferRuns(request, optionsopt, callbackopt) → {Promise}
Returns information about running and completed jobs.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is Array of TransferRun. When autoPaginate: false is specified through options, it contains the result in a single response. If the response indicates the next page exists, the third parameter is set to be used for the next request object. The fourth parameter keeps the raw response object of an object representing ListTransferRunsResponse. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
// Iterate over all elements.
const formattedParent = client.projectTransferConfigPath('[PROJECT]', '[TRANSFER_CONFIG]');
client.listTransferRuns({parent: formattedParent})
.then(responses => {
const resources = responses[0];
for (const resource of resources) {
// doThingsWith(resource)
}
})
.catch(err => {
console.error(err);
});
// Or obtain the paged response.
const formattedParent = client.projectTransferConfigPath('[PROJECT]', '[TRANSFER_CONFIG]');
const options = {autoPaginate: false};
const callback = responses => {
// The actual resources in a response.
const resources = responses[0];
// The next request if the response shows that there are more responses.
const nextRequest = responses[1];
// The actual response object, if necessary.
// const rawResponse = responses[2];
for (const resource of resources) {
// doThingsWith(resource);
}
if (nextRequest) {
// Fetch the next page.
return client.listTransferRuns(nextRequest, options).then(callback);
}
}
client.listTransferRuns({parent: formattedParent}, options)
.then(callback)
.catch(err => {
console.error(err);
});
listTransferRunsStream(request, optionsopt) → {Stream}
Equivalent to listTransferRuns, but returns a NodeJS Stream object.
This fetches the paged responses for listTransferRuns continuously and invokes the callback registered for 'data' event for each element in the responses.
The returned object has 'end' method when no more elements are required.
autoPaginate option will be ignored.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
const formattedParent = client.projectTransferConfigPath('[PROJECT]', '[TRANSFER_CONFIG]');
client.listTransferRunsStream({parent: formattedParent})
.on('data', element => {
// doThingsWith(element)
}).on('error', err => {
console.log(err);
});
locationDataSourcePath(project, location, dataSource) → {String}
Return a fully-qualified location_data_source resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
String | |
location |
String | |
dataSource |
String |
locationPath(project, location) → {String}
Return a fully-qualified location resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
String | |
location |
String |
locationRunPath(project, location, transferConfig, run) → {String}
Return a fully-qualified location_run resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
String | |
location |
String | |
transferConfig |
String | |
run |
String |
locationTransferConfigPath(project, location, transferConfig) → {String}
Return a fully-qualified location_transfer_config resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
String | |
location |
String | |
transferConfig |
String |
matchDataSourceFromLocationDataSourceName(locationDataSourceName) → {String}
Parse the locationDataSourceName from a location_data_source resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationDataSourceName |
String |
A fully-qualified path representing a location_data_source resources. |
matchDataSourceFromProjectDataSourceName(projectDataSourceName) → {String}
Parse the projectDataSourceName from a project_data_source resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectDataSourceName |
String |
A fully-qualified path representing a project_data_source resources. |
matchLocationFromLocationDataSourceName(locationDataSourceName) → {String}
Parse the locationDataSourceName from a location_data_source resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationDataSourceName |
String |
A fully-qualified path representing a location_data_source resources. |
matchLocationFromLocationName(locationName) → {String}
Parse the locationName from a location resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationName |
String |
A fully-qualified path representing a location resources. |
matchLocationFromLocationRunName(locationRunName) → {String}
Parse the locationRunName from a location_run resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationRunName |
String |
A fully-qualified path representing a location_run resources. |
matchLocationFromLocationTransferConfigName(locationTransferConfigName) → {String}
Parse the locationTransferConfigName from a location_transfer_config resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationTransferConfigName |
String |
A fully-qualified path representing a location_transfer_config resources. |
matchProjectFromLocationDataSourceName(locationDataSourceName) → {String}
Parse the locationDataSourceName from a location_data_source resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationDataSourceName |
String |
A fully-qualified path representing a location_data_source resources. |
matchProjectFromLocationName(locationName) → {String}
Parse the locationName from a location resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationName |
String |
A fully-qualified path representing a location resources. |
matchProjectFromLocationRunName(locationRunName) → {String}
Parse the locationRunName from a location_run resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationRunName |
String |
A fully-qualified path representing a location_run resources. |
matchProjectFromLocationTransferConfigName(locationTransferConfigName) → {String}
Parse the locationTransferConfigName from a location_transfer_config resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationTransferConfigName |
String |
A fully-qualified path representing a location_transfer_config resources. |
matchProjectFromProjectDataSourceName(projectDataSourceName) → {String}
Parse the projectDataSourceName from a project_data_source resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectDataSourceName |
String |
A fully-qualified path representing a project_data_source resources. |
matchProjectFromProjectName(projectName) → {String}
Parse the projectName from a project resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectName |
String |
A fully-qualified path representing a project resources. |
matchProjectFromProjectRunName(projectRunName) → {String}
Parse the projectRunName from a project_run resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectRunName |
String |
A fully-qualified path representing a project_run resources. |
matchProjectFromProjectTransferConfigName(projectTransferConfigName) → {String}
Parse the projectTransferConfigName from a project_transfer_config resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectTransferConfigName |
String |
A fully-qualified path representing a project_transfer_config resources. |
matchRunFromLocationRunName(locationRunName) → {String}
Parse the locationRunName from a location_run resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationRunName |
String |
A fully-qualified path representing a location_run resources. |
matchRunFromProjectRunName(projectRunName) → {String}
Parse the projectRunName from a project_run resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectRunName |
String |
A fully-qualified path representing a project_run resources. |
matchTransferConfigFromLocationRunName(locationRunName) → {String}
Parse the locationRunName from a location_run resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationRunName |
String |
A fully-qualified path representing a location_run resources. |
matchTransferConfigFromLocationTransferConfigName(locationTransferConfigName) → {String}
Parse the locationTransferConfigName from a location_transfer_config resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationTransferConfigName |
String |
A fully-qualified path representing a location_transfer_config resources. |
matchTransferConfigFromProjectRunName(projectRunName) → {String}
Parse the projectRunName from a project_run resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectRunName |
String |
A fully-qualified path representing a project_run resources. |
matchTransferConfigFromProjectTransferConfigName(projectTransferConfigName) → {String}
Parse the projectTransferConfigName from a project_transfer_config resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectTransferConfigName |
String |
A fully-qualified path representing a project_transfer_config resources. |
projectDataSourcePath(project, dataSource) → {String}
Return a fully-qualified project_data_source resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
String | |
dataSource |
String |
projectPath(project) → {String}
Return a fully-qualified project resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
String |
projectRunPath(project, transferConfig, run) → {String}
Return a fully-qualified project_run resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
String | |
transferConfig |
String | |
run |
String |
projectTransferConfigPath(project, transferConfig) → {String}
Return a fully-qualified project_transfer_config resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
String | |
transferConfig |
String |
scheduleTransferRuns(request, optionsopt, callbackopt) → {Promise}
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.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing ScheduleTransferRunsResponse. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
const formattedParent = client.projectTransferConfigPath('[PROJECT]', '[TRANSFER_CONFIG]');
const startTime = {};
const endTime = {};
const request = {
parent: formattedParent,
startTime: startTime,
endTime: endTime,
};
client.scheduleTransferRuns(request)
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
startManualTransferRuns(request, optionsopt, callbackopt) → {Promise}
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.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing StartManualTransferRunsResponse. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
client.startManualTransferRuns({})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
updateTransferConfig(request, optionsopt, callbackopt) → {Promise}
Updates a data transfer configuration. All fields must be set, even if they are not updated.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing TransferConfig. |
Example
const bigqueryDataTransfer = require('@google-cloud/bigquery-data-transfer');
const client = new bigqueryDataTransfer.v1.DataTransferServiceClient({
// optional auth parameters.
});
const transferConfig = {};
const updateMask = {};
const request = {
transferConfig: transferConfig,
updateMask: updateMask,
};
client.updateTransferConfig(request)
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});