tasks
Creates, updates, deletes, gets or lists a tasks
resource.
Overview
Name | tasks |
Type | Resource |
Id | google.dataplex.tasks |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_lakes_tasks_get
- projects_locations_lakes_tasks_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The relative resource name of the task, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ tasks/{task_id}. |
createTime | string (google-datetime) | Output only. The time when the task was created. |
description | string | Optional. Description of the task. |
displayName | string | Optional. User friendly display name. |
executionSpec | object | Required. Spec related to how a task is executed. (id: GoogleCloudDataplexV1TaskExecutionSpec) |
executionStatus | object | Output only. Status of the latest task executions. (id: GoogleCloudDataplexV1TaskExecutionStatus) |
labels | object | Optional. User-defined labels for the task. |
notebook | object | Config related to running scheduled Notebooks. (id: GoogleCloudDataplexV1TaskNotebookTaskConfig) |
spark | object | Config related to running custom Spark tasks. (id: GoogleCloudDataplexV1TaskSparkTaskConfig) |
state | string | Output only. Current state of the task. |
triggerSpec | object | Required. Spec related to how often and when a task should be triggered. (id: GoogleCloudDataplexV1TaskTriggerSpec) |
uid | string | Output only. System generated globally unique ID for the task. This ID will be different if the task is deleted and re-created with the same name. |
updateTime | string (google-datetime) | Output only. The time when the task was last updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The relative resource name of the task, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ tasks/{task_id}. |
createTime | string (google-datetime) | Output only. The time when the task was created. |
description | string | Optional. Description of the task. |
displayName | string | Optional. User friendly display name. |
executionSpec | object | Required. Spec related to how a task is executed. (id: GoogleCloudDataplexV1TaskExecutionSpec) |
executionStatus | object | Output only. Status of the latest task executions. (id: GoogleCloudDataplexV1TaskExecutionStatus) |
labels | object | Optional. User-defined labels for the task. |
notebook | object | Config related to running scheduled Notebooks. (id: GoogleCloudDataplexV1TaskNotebookTaskConfig) |
spark | object | Config related to running custom Spark tasks. (id: GoogleCloudDataplexV1TaskSparkTaskConfig) |
state | string | Output only. Current state of the task. |
triggerSpec | object | Required. Spec related to how often and when a task should be triggered. (id: GoogleCloudDataplexV1TaskTriggerSpec) |
uid | string | Output only. System generated globally unique ID for the task. This ID will be different if the task is deleted and re-created with the same name. |
updateTime | string (google-datetime) | Output only. The time when the task was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_lakes_tasks_get | select | projectsId , locationsId , lakesId , tasksId | Get task resource. | |
projects_locations_lakes_tasks_list | select | projectsId , locationsId , lakesId | pageSize , pageToken , filter , orderBy | Lists tasks under the given lake. |
projects_locations_lakes_tasks_create | insert | projectsId , locationsId , lakesId | taskId , validateOnly | Creates a task resource within a lake. |
projects_locations_lakes_tasks_patch | update | projectsId , locationsId , lakesId , tasksId | updateMask , validateOnly | Update the task resource. |
projects_locations_lakes_tasks_delete | delete | projectsId , locationsId , lakesId , tasksId | Delete the task resource. | |
projects_locations_lakes_tasks_run | exec | projectsId , locationsId , lakesId , tasksId | Run an on demand execution of a Task. |
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 |
---|---|---|
lakesId | string | |
locationsId | string | |
projectsId | string | |
tasksId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
taskId | string | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean |
SELECT
examples
- projects_locations_lakes_tasks_get
- projects_locations_lakes_tasks_list
Get task resource.
SELECT
name,
createTime,
description,
displayName,
executionSpec,
executionStatus,
labels,
notebook,
spark,
state,
triggerSpec,
uid,
updateTime
FROM google.dataplex.tasks
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND lakesId = '{{ lakesId }}' -- required
AND tasksId = '{{ tasksId }}' -- required;
Lists tasks under the given lake.
SELECT
name,
createTime,
description,
displayName,
executionSpec,
executionStatus,
labels,
notebook,
spark,
state,
triggerSpec,
uid,
updateTime
FROM google.dataplex.tasks
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND lakesId = '{{ lakesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- projects_locations_lakes_tasks_create
- Manifest
Creates a task resource within a lake.
INSERT INTO google.dataplex.tasks (
data__description,
data__displayName,
data__labels,
data__triggerSpec,
data__executionSpec,
data__spark,
data__notebook,
projectsId,
locationsId,
lakesId,
taskId,
validateOnly
)
SELECT
'{{ description }}',
'{{ displayName }}',
'{{ labels }}',
'{{ triggerSpec }}',
'{{ executionSpec }}',
'{{ spark }}',
'{{ notebook }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ lakesId }}',
'{{ taskId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: tasks
props:
- name: projectsId
value: string
description: Required parameter for the tasks resource.
- name: locationsId
value: string
description: Required parameter for the tasks resource.
- name: lakesId
value: string
description: Required parameter for the tasks resource.
- name: description
value: string
description: >
Optional. Description of the task.
- name: displayName
value: string
description: >
Optional. User friendly display name.
- name: labels
value: object
description: >
Optional. User-defined labels for the task.
- name: triggerSpec
value: object
description: >
Required. Spec related to how often and when a task should be triggered.
- name: executionSpec
value: object
description: >
Required. Spec related to how a task is executed.
- name: spark
value: object
description: >
Config related to running custom Spark tasks.
- name: notebook
value: object
description: >
Config related to running scheduled Notebooks.
- name: taskId
value: string
- name: validateOnly
value: boolean
UPDATE
examples
- projects_locations_lakes_tasks_patch
Update the task resource.
UPDATE google.dataplex.tasks
SET
data__description = '{{ description }}',
data__displayName = '{{ displayName }}',
data__labels = '{{ labels }}',
data__triggerSpec = '{{ triggerSpec }}',
data__executionSpec = '{{ executionSpec }}',
data__spark = '{{ spark }}',
data__notebook = '{{ notebook }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND lakesId = '{{ lakesId }}' --required
AND tasksId = '{{ tasksId }}' --required
AND updateMask = '{{ updateMask}}'
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- projects_locations_lakes_tasks_delete
Delete the task resource.
DELETE FROM google.dataplex.tasks
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND lakesId = '{{ lakesId }}' --required
AND tasksId = '{{ tasksId }}' --required;
Lifecycle Methods
- projects_locations_lakes_tasks_run
Run an on demand execution of a Task.
EXEC google.dataplex.tasks.projects_locations_lakes_tasks_run
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@lakesId='{{ lakesId }}' --required,
@tasksId='{{ tasksId }}' --required
@@json=
'{
"labels": "{{ labels }}",
"args": "{{ args }}"
}';