Skip to main content

jobs

Creates, updates, deletes, gets or lists a jobs resource.

Overview

Namejobs
TypeResource
Idaws.glue.jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
jobsarrayA list of job definitions.
jobs_not_foundarrayA list of names of jobs not found.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
batch_get_jobsselectregionReturns a list of resource metadata for a given list of job names. After calling the ListJobs operation, you can call this operation to access the data to which you have been granted permissions. This operation supports all IAM permissions, including permission conditions that uses tags.
get_jobselectregionRetrieves an existing job definition.
get_jobsselectregionRetrieves all current job definitions.
create_jobinsertregionCreates a new job definition.
update_jobupdateregion, JobName, JobUpdateUpdates an existing job definition. The previous job definition is completely overwritten by this information.
update_job_from_source_controlupdateregionSynchronizes a job from the source control repository. This operation takes the job artifacts that are located in the remote repository and updates the Glue internal stores with these artifacts. This API supports optional parameters which take in the repository information.
delete_jobdeleteregionDeletes a specified job definition. If the job definition is not found, no exception is thrown.
list_jobsexecregionRetrieves the names of all job resources in this Amazon Web Services account, or the resources with the specified tag. This operation allows you to see which resources are available in your account, and their names. This operation takes the optional Tags field, which you can use as a filter on the response so that tagged resources can be retrieved as a group. If you choose to use tags filtering, only resources with the tag are retrieved.
reset_job_bookmarkexecregion, JobNameResets a bookmark entry. For more information about enabling and using job bookmarks, see: Tracking processed data using job bookmarks Job parameters used by Glue Job structure
start_job_runexecregion, JobNameStarts a job run using a job definition.
update_source_control_from_jobexecregionSynchronizes a job to the source control repository. This operation takes the job artifacts from the Glue internal stores and makes a commit to the remote repository that is configured on the job. This API supports optional parameters which take in the repository information.

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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns a list of resource metadata for a given list of job names. After calling the ListJobs operation, you can call this operation to access the data to which you have been granted permissions. This operation supports all IAM permissions, including permission conditions that uses tags.

SELECT
jobs,
jobs_not_found
FROM aws.glue.jobs
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new job definition.

INSERT INTO aws.glue.jobs (
Name,
JobMode,
JobRunQueuingEnabled,
Description,
LogUri,
Role,
ExecutionProperty,
Command,
DefaultArguments,
NonOverridableArguments,
Connections,
MaxRetries,
AllocatedCapacity,
Timeout,
MaxCapacity,
SecurityConfiguration,
Tags,
NotificationProperty,
GlueVersion,
NumberOfWorkers,
WorkerType,
CodeGenConfigurationNodes,
ExecutionClass,
SourceControlDetails,
MaintenanceWindow,
region
)
SELECT
'{{ Name }}',
'{{ JobMode }}',
{{ JobRunQueuingEnabled }},
'{{ Description }}',
'{{ LogUri }}',
'{{ Role }}',
'{{ ExecutionProperty }}',
'{{ Command }}',
'{{ DefaultArguments }}',
'{{ NonOverridableArguments }}',
'{{ Connections }}',
{{ MaxRetries }},
{{ AllocatedCapacity }},
{{ Timeout }},
{{ MaxCapacity }},
'{{ SecurityConfiguration }}',
'{{ Tags }}',
'{{ NotificationProperty }}',
'{{ GlueVersion }}',
{{ NumberOfWorkers }},
'{{ WorkerType }}',
'{{ CodeGenConfigurationNodes }}',
'{{ ExecutionClass }}',
'{{ SourceControlDetails }}',
'{{ MaintenanceWindow }}',
'{{ region }}'
RETURNING
name
;

UPDATE examples

Updates an existing job definition. The previous job definition is completely overwritten by this information.

UPDATE aws.glue.jobs
SET
JobName = '{{ JobName }}',
JobUpdate = '{{ JobUpdate }}'
WHERE
region = '{{ region }}' --required
AND JobName = '{{ JobName }}' --required
AND JobUpdate = '{{ JobUpdate }}' --required
RETURNING
job_name;

DELETE examples

Deletes a specified job definition. If the job definition is not found, no exception is thrown.

DELETE FROM aws.glue.jobs
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Retrieves the names of all job resources in this Amazon Web Services account, or the resources with the specified tag. This operation allows you to see which resources are available in your account, and their names. This operation takes the optional Tags field, which you can use as a filter on the response so that tagged resources can be retrieved as a group. If you choose to use tags filtering, only resources with the tag are retrieved.

EXEC aws.glue.jobs.list_jobs
@region='{{ region }}' --required
@@json=
'{
"NextToken": "{{ NextToken }}",
"MaxResults": {{ MaxResults }},
"Tags": "{{ Tags }}"
}'
;