tasks
Creates, updates, deletes, gets or lists a tasks
resource.
Overview
Name | tasks |
Type | Resource |
Id | google.dataplex.tasks |
Fields
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}. |
description | string | Optional. Description of the task. |
createTime | string | Output only. The time when the task was created. |
displayName | string | Optional. User friendly display name. |
executionSpec | object | Execution related settings, like retry and service_account. |
executionStatus | object | Status of the task execution (e.g. Jobs). |
labels | object | Optional. User-defined labels for the task. |
notebook | object | Config for running scheduled notebooks. |
spark | object | User-specified config for running a Spark task. |
state | string | Output only. Current state of the task. |
triggerSpec | object | Task scheduling and trigger settings. |
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 | Output only. The time when the task was last updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_lakes_tasks_get | SELECT | lakesId, locationsId, projectsId, tasksId | Get task resource. |
projects_locations_lakes_tasks_list | SELECT | lakesId, locationsId, projectsId | Lists tasks under the given lake. |
projects_locations_lakes_tasks_create | INSERT | lakesId, locationsId, projectsId | Creates a task resource within a lake. |
projects_locations_lakes_tasks_delete | DELETE | lakesId, locationsId, projectsId, tasksId | Delete the task resource. |
projects_locations_lakes_tasks_patch | UPDATE | lakesId, locationsId, projectsId, tasksId | Update the task resource. |
projects_locations_lakes_tasks_run | EXEC | lakesId, locationsId, projectsId, tasksId | Run an on demand execution of a Task. |
SELECT
examples
Lists tasks under the given lake.
SELECT
name,
description,
createTime,
displayName,
executionSpec,
executionStatus,
labels,
notebook,
spark,
state,
triggerSpec,
uid,
updateTime
FROM google.dataplex.tasks
WHERE lakesId = '{{ lakesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new tasks
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.dataplex.tasks (
lakesId,
locationsId,
projectsId,
description,
displayName,
labels,
triggerSpec,
executionSpec,
spark,
notebook
)
SELECT
'{{ lakesId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ description }}',
'{{ displayName }}',
'{{ labels }}',
'{{ triggerSpec }}',
'{{ executionSpec }}',
'{{ spark }}',
'{{ notebook }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: uid
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: description
value: string
- name: displayName
value: string
- name: state
value: string
- name: labels
value: object
- name: triggerSpec
value:
- name: type
value: string
- name: startTime
value: string
- name: disabled
value: boolean
- name: maxRetries
value: integer
- name: schedule
value: string
- name: executionSpec
value:
- name: args
value: object
- name: serviceAccount
value: string
- name: project
value: string
- name: maxJobExecutionLifetime
value: string
- name: kmsKey
value: string
- name: executionStatus
value:
- name: updateTime
value: string
- name: latestJob
value:
- name: name
value: string
- name: uid
value: string
- name: startTime
value: string
- name: endTime
value: string
- name: state
value: string
- name: retryCount
value: integer
- name: service
value: string
- name: serviceJob
value: string
- name: message
value: string
- name: labels
value: object
- name: trigger
value: string
- name: spark
value:
- name: mainJarFileUri
value: string
- name: mainClass
value: string
- name: pythonScriptFile
value: string
- name: sqlScriptFile
value: string
- name: sqlScript
value: string
- name: fileUris
value:
- string
- name: archiveUris
value:
- string
- name: infrastructureSpec
value:
- name: batch
value:
- name: executorsCount
value: integer
- name: maxExecutorsCount
value: integer
- name: containerImage
value:
- name: image
value: string
- name: javaJars
value:
- string
- name: pythonPackages
value:
- string
- name: properties
value: object
- name: vpcNetwork
value:
- name: network
value: string
- name: subNetwork
value: string
- name: networkTags
value:
- string
- name: notebook
value:
- name: notebook
value: string
- name: fileUris
value:
- string
- name: archiveUris
value:
- string
UPDATE
example
Updates a tasks
resource.
/*+ update */
UPDATE google.dataplex.tasks
SET
description = '{{ description }}',
displayName = '{{ displayName }}',
labels = '{{ labels }}',
triggerSpec = '{{ triggerSpec }}',
executionSpec = '{{ executionSpec }}',
spark = '{{ spark }}',
notebook = '{{ notebook }}'
WHERE
lakesId = '{{ lakesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND tasksId = '{{ tasksId }}';
DELETE
example
Deletes the specified tasks
resource.
/*+ delete */
DELETE FROM google.dataplex.tasks
WHERE lakesId = '{{ lakesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND tasksId = '{{ tasksId }}';