jobs
Creates, updates, deletes, gets or lists a jobs resource.
Overview
| Name | jobs |
| Type | Resource |
| Id | aws.glue.jobs |
Fields
The following fields are returned by SELECT queries:
- batch_get_jobs
- get_job
- get_jobs
| Name | Datatype | Description |
|---|---|---|
jobs | array | A list of job definitions. |
jobs_not_found | array | A list of names of jobs not found. |
| Name | Datatype | Description |
|---|---|---|
allocated_capacity | integer | This field is deprecated. Use MaxCapacity instead. The number of Glue data processing units (DPUs) allocated to runs of this job. You can allocate a minimum of 2 DPUs; the default is 10. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the Glue pricing page. |
code_gen_configuration_nodes | object | The representation of a directed acyclic graph on which both the Glue Studio visual component and Glue Studio code generation is based. |
command | object | The JobCommand that runs this job. |
connections | object | The connections used for this job. |
created_on | string (date-time) | The time and date that this job definition was created. |
default_arguments | object | The default arguments for every run of this job, specified as name-value pairs. You can specify arguments here that your own job-execution script consumes, as well as arguments that Glue itself consumes. Job arguments may be logged. Do not pass plaintext secrets as arguments. Retrieve secrets from a Glue Connection, Secrets Manager or other secret management mechanism if you intend to keep them within the Job. For information about how to specify and consume your own Job arguments, see the Calling Glue APIs in Python topic in the developer guide. For information about the arguments you can provide to this field when configuring Spark jobs, see the Special Parameters Used by Glue topic in the developer guide. For information about the arguments you can provide to this field when configuring Ray jobs, see Using job parameters in Ray jobs in the developer guide. |
description | string | A description of the job. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>) |
execution_class | string | Indicates whether the job is run with a standard or flexible execution class. The standard execution class is ideal for time-sensitive workloads that require fast job startup and dedicated resources. The flexible execution class is appropriate for time-insensitive jobs whose start and completion times may vary. Only jobs with Glue version 3.0 and above and command type glueetl will be allowed to set ExecutionClass to FLEX. The flexible execution class is available for Spark jobs. (FLEX, STANDARD) |
execution_property | object | An ExecutionProperty specifying the maximum number of concurrent runs allowed for this job. |
glue_version | string | In Spark jobs, GlueVersion determines the versions of Apache Spark and Python that Glue available in a job. The Python version indicates the version supported for jobs of type Spark. Ray jobs should set GlueVersion to 4.0 or greater. However, the versions of Ray, Python and additional libraries available in your Ray job are determined by the Runtime parameter of the Job command. For more information about the available Glue versions and corresponding Spark and Python versions, see Glue version in the developer guide. Jobs that are created without specifying a Glue version default to Glue 5.1. (pattern: <code>^(\w+.)+\w+$</code>) |
job_mode | string | A mode that describes how a job was created. Valid values are: SCRIPT - The job was created using the Glue Studio script editor. VISUAL - The job was created using the Glue Studio visual editor. NOTEBOOK - The job was created using an interactive sessions notebook. When the JobMode field is missing or null, SCRIPT is assigned as the default value. (SCRIPT, VISUAL, NOTEBOOK) |
job_run_queuing_enabled | boolean | Specifies whether job run queuing is enabled for the job runs for this job. A value of true means job run queuing is enabled for the job runs. If false or not populated, the job runs will not be considered for queueing. If this field does not match the value set in the job run, then the value from the job run field will be used. |
last_modified_on | string (date-time) | The last point in time when this job definition was modified. |
log_uri | string | This field is reserved for future use. |
maintenance_window | string | This field specifies a day of the week and hour for a maintenance window for streaming jobs. Glue periodically performs maintenance activities. During these maintenance windows, Glue will need to restart your streaming jobs. Glue will restart the job within 3 hours of the specified maintenance window. For instance, if you set up the maintenance window for Monday at 10:00AM GMT, your jobs will be restarted between 10:00AM GMT to 1:00PM GMT. (pattern: <code>^(Sun|Mon|Tue|Wed|Thu|Fri|Sat):([01]?[0-9]|2[0-3])$</code>) |
max_capacity | number (double) | For Glue version 1.0 or earlier jobs, using the standard worker type, the number of Glue data processing units (DPUs) that can be allocated when this job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the Glue pricing page. For Glue version 2.0 or later jobs, you cannot specify a Maximum capacity. Instead, you should specify a Worker type and the Number of workers. Do not set MaxCapacity if using WorkerType and NumberOfWorkers. The value that can be allocated for MaxCapacity depends on whether you are running a Python shell job, an Apache Spark ETL job, or an Apache Spark streaming ETL job: When you specify a Python shell job (JobCommand.Name="pythonshell"), you can allocate either 0.0625 or 1 DPU. The default is 0.0625 DPU. When you specify an Apache Spark ETL job (JobCommand.Name="glueetl") or Apache Spark streaming ETL job (JobCommand.Name="gluestreaming"), you can allocate from 2 to 100 DPUs. The default is 10 DPUs. This job type cannot have a fractional DPU allocation. |
max_retries | integer | The maximum number of times to retry this job after a JobRun fails. |
name | string | The name you assign to this job definition. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*</code>) |
non_overridable_arguments | object | Arguments for this job that are not overridden when providing job arguments in a job run, specified as name-value pairs. |
notification_property | object | Specifies configuration properties of a job notification. |
number_of_workers | integer | The number of workers of a defined workerType that are allocated when a job runs. |
profile_name | string | The name of an Glue usage profile associated with the job. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*</code>) |
role | string | The name or Amazon Resource Name (ARN) of the IAM role associated with this job. |
security_configuration | string | The name of the SecurityConfiguration structure to be used with this job. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*</code>) |
source_control_details | object | The details for a source control configuration for a job, allowing synchronization of job artifacts to or from a remote repository. |
timeout | integer | The job timeout in minutes. This is the maximum time that a job run can consume resources before it is terminated and enters TIMEOUT status. Jobs must have timeout values less than 7 days or 10080 minutes. Otherwise, the jobs will throw an exception. When the value is left blank, the timeout is defaulted to 2,880 minutes for Glue version 4.0 and earlier, or 480 minutes for Glue version 5.0 and later. Any existing Glue jobs that had a timeout value greater than 7 days will be defaulted to 7 days. For instance if you have specified a timeout of 20 days for a batch job, it will be stopped on the 7th day. For streaming jobs, if you have set up a maintenance window, it will be restarted during the maintenance window after 7 days. |
worker_type | string | The type of predefined worker that is allocated when a job runs. Glue provides multiple worker types to accommodate different workload requirements: G Worker Types (General-purpose compute workers): G.1X: 1 DPU (4 vCPUs, 16 GB memory, 94GB disk) G.2X: 2 DPU (8 vCPUs, 32 GB memory, 138GB disk) G.4X: 4 DPU (16 vCPUs, 64 GB memory, 256GB disk) G.8X: 8 DPU (32 vCPUs, 128 GB memory, 512GB disk) G.12X: 12 DPU (48 vCPUs, 192 GB memory, 768GB disk) G.16X: 16 DPU (64 vCPUs, 256 GB memory, 1024GB disk) R Worker Types (Memory-optimized workers): R.1X: 1 M-DPU (4 vCPUs, 32 GB memory) R.2X: 2 M-DPU (8 vCPUs, 64 GB memory) R.4X: 4 M-DPU (16 vCPUs, 128 GB memory) R.8X: 8 M-DPU (32 vCPUs, 256 GB memory) (Standard, G.1X, G.2X, G.025X, G.4X, G.8X, Z.2X) |
| Name | Datatype | Description |
|---|---|---|
allocated_capacity | integer | This field is deprecated. Use MaxCapacity instead. The number of Glue data processing units (DPUs) allocated to runs of this job. You can allocate a minimum of 2 DPUs; the default is 10. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the Glue pricing page. |
code_gen_configuration_nodes | object | The representation of a directed acyclic graph on which both the Glue Studio visual component and Glue Studio code generation is based. |
command | object | The JobCommand that runs this job. |
connections | object | The connections used for this job. |
created_on | string (date-time) | The time and date that this job definition was created. |
default_arguments | object | The default arguments for every run of this job, specified as name-value pairs. You can specify arguments here that your own job-execution script consumes, as well as arguments that Glue itself consumes. Job arguments may be logged. Do not pass plaintext secrets as arguments. Retrieve secrets from a Glue Connection, Secrets Manager or other secret management mechanism if you intend to keep them within the Job. For information about how to specify and consume your own Job arguments, see the Calling Glue APIs in Python topic in the developer guide. For information about the arguments you can provide to this field when configuring Spark jobs, see the Special Parameters Used by Glue topic in the developer guide. For information about the arguments you can provide to this field when configuring Ray jobs, see Using job parameters in Ray jobs in the developer guide. |
description | string | A description of the job. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>) |
execution_class | string | Indicates whether the job is run with a standard or flexible execution class. The standard execution class is ideal for time-sensitive workloads that require fast job startup and dedicated resources. The flexible execution class is appropriate for time-insensitive jobs whose start and completion times may vary. Only jobs with Glue version 3.0 and above and command type glueetl will be allowed to set ExecutionClass to FLEX. The flexible execution class is available for Spark jobs. (FLEX, STANDARD) |
execution_property | object | An ExecutionProperty specifying the maximum number of concurrent runs allowed for this job. |
glue_version | string | In Spark jobs, GlueVersion determines the versions of Apache Spark and Python that Glue available in a job. The Python version indicates the version supported for jobs of type Spark. Ray jobs should set GlueVersion to 4.0 or greater. However, the versions of Ray, Python and additional libraries available in your Ray job are determined by the Runtime parameter of the Job command. For more information about the available Glue versions and corresponding Spark and Python versions, see Glue version in the developer guide. Jobs that are created without specifying a Glue version default to Glue 5.1. (pattern: <code>^(\w+.)+\w+$</code>) |
job_mode | string | A mode that describes how a job was created. Valid values are: SCRIPT - The job was created using the Glue Studio script editor. VISUAL - The job was created using the Glue Studio visual editor. NOTEBOOK - The job was created using an interactive sessions notebook. When the JobMode field is missing or null, SCRIPT is assigned as the default value. (SCRIPT, VISUAL, NOTEBOOK) |
job_run_queuing_enabled | boolean | Specifies whether job run queuing is enabled for the job runs for this job. A value of true means job run queuing is enabled for the job runs. If false or not populated, the job runs will not be considered for queueing. If this field does not match the value set in the job run, then the value from the job run field will be used. |
last_modified_on | string (date-time) | The last point in time when this job definition was modified. |
log_uri | string | This field is reserved for future use. |
maintenance_window | string | This field specifies a day of the week and hour for a maintenance window for streaming jobs. Glue periodically performs maintenance activities. During these maintenance windows, Glue will need to restart your streaming jobs. Glue will restart the job within 3 hours of the specified maintenance window. For instance, if you set up the maintenance window for Monday at 10:00AM GMT, your jobs will be restarted between 10:00AM GMT to 1:00PM GMT. (pattern: <code>^(Sun|Mon|Tue|Wed|Thu|Fri|Sat):([01]?[0-9]|2[0-3])$</code>) |
max_capacity | number (double) | For Glue version 1.0 or earlier jobs, using the standard worker type, the number of Glue data processing units (DPUs) that can be allocated when this job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the Glue pricing page. For Glue version 2.0 or later jobs, you cannot specify a Maximum capacity. Instead, you should specify a Worker type and the Number of workers. Do not set MaxCapacity if using WorkerType and NumberOfWorkers. The value that can be allocated for MaxCapacity depends on whether you are running a Python shell job, an Apache Spark ETL job, or an Apache Spark streaming ETL job: When you specify a Python shell job (JobCommand.Name="pythonshell"), you can allocate either 0.0625 or 1 DPU. The default is 0.0625 DPU. When you specify an Apache Spark ETL job (JobCommand.Name="glueetl") or Apache Spark streaming ETL job (JobCommand.Name="gluestreaming"), you can allocate from 2 to 100 DPUs. The default is 10 DPUs. This job type cannot have a fractional DPU allocation. |
max_retries | integer | The maximum number of times to retry this job after a JobRun fails. |
name | string | The name you assign to this job definition. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*</code>) |
non_overridable_arguments | object | Arguments for this job that are not overridden when providing job arguments in a job run, specified as name-value pairs. |
notification_property | object | Specifies configuration properties of a job notification. |
number_of_workers | integer | The number of workers of a defined workerType that are allocated when a job runs. |
profile_name | string | The name of an Glue usage profile associated with the job. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*</code>) |
role | string | The name or Amazon Resource Name (ARN) of the IAM role associated with this job. |
security_configuration | string | The name of the SecurityConfiguration structure to be used with this job. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*</code>) |
source_control_details | object | The details for a source control configuration for a job, allowing synchronization of job artifacts to or from a remote repository. |
timeout | integer | The job timeout in minutes. This is the maximum time that a job run can consume resources before it is terminated and enters TIMEOUT status. Jobs must have timeout values less than 7 days or 10080 minutes. Otherwise, the jobs will throw an exception. When the value is left blank, the timeout is defaulted to 2,880 minutes for Glue version 4.0 and earlier, or 480 minutes for Glue version 5.0 and later. Any existing Glue jobs that had a timeout value greater than 7 days will be defaulted to 7 days. For instance if you have specified a timeout of 20 days for a batch job, it will be stopped on the 7th day. For streaming jobs, if you have set up a maintenance window, it will be restarted during the maintenance window after 7 days. |
worker_type | string | The type of predefined worker that is allocated when a job runs. Glue provides multiple worker types to accommodate different workload requirements: G Worker Types (General-purpose compute workers): G.1X: 1 DPU (4 vCPUs, 16 GB memory, 94GB disk) G.2X: 2 DPU (8 vCPUs, 32 GB memory, 138GB disk) G.4X: 4 DPU (16 vCPUs, 64 GB memory, 256GB disk) G.8X: 8 DPU (32 vCPUs, 128 GB memory, 512GB disk) G.12X: 12 DPU (48 vCPUs, 192 GB memory, 768GB disk) G.16X: 16 DPU (64 vCPUs, 256 GB memory, 1024GB disk) R Worker Types (Memory-optimized workers): R.1X: 1 M-DPU (4 vCPUs, 32 GB memory) R.2X: 2 M-DPU (8 vCPUs, 64 GB memory) R.4X: 4 M-DPU (16 vCPUs, 128 GB memory) R.8X: 8 M-DPU (32 vCPUs, 256 GB memory) (Standard, G.1X, G.2X, G.025X, G.4X, G.8X, Z.2X) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
batch_get_jobs | select | region | 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. | |
get_job | select | region | Retrieves an existing job definition. | |
get_jobs | select | region | Retrieves all current job definitions. | |
create_job | insert | region | Creates a new job definition. | |
update_job | update | region, JobName, JobUpdate | Updates an existing job definition. The previous job definition is completely overwritten by this information. | |
update_job_from_source_control | update | region | Synchronizes 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_job | delete | region | Deletes a specified job definition. If the job definition is not found, no exception is thrown. | |
list_jobs | exec | region | 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. | |
reset_job_bookmark | exec | region, JobName | Resets 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_run | exec | region, JobName | Starts a job run using a job definition. | |
update_source_control_from_job | exec | region | Synchronizes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- batch_get_jobs
- get_job
- get_jobs
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
;
Retrieves an existing job definition.
SELECT
allocated_capacity,
code_gen_configuration_nodes,
command,
connections,
created_on,
default_arguments,
description,
execution_class,
execution_property,
glue_version,
job_mode,
job_run_queuing_enabled,
last_modified_on,
log_uri,
maintenance_window,
max_capacity,
max_retries,
name,
non_overridable_arguments,
notification_property,
number_of_workers,
profile_name,
role,
security_configuration,
source_control_details,
timeout,
worker_type
FROM aws.glue.jobs
WHERE region = '{{ region }}' -- required
;
Retrieves all current job definitions.
SELECT
allocated_capacity,
code_gen_configuration_nodes,
command,
connections,
created_on,
default_arguments,
description,
execution_class,
execution_property,
glue_version,
job_mode,
job_run_queuing_enabled,
last_modified_on,
log_uri,
maintenance_window,
max_capacity,
max_retries,
name,
non_overridable_arguments,
notification_property,
number_of_workers,
profile_name,
role,
security_configuration,
source_control_details,
timeout,
worker_type
FROM aws.glue.jobs
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_job
- Manifest
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
;
# Description fields are for documentation purposes
- name: jobs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the jobs resource.
- name: Name
value: "{{ Name }}"
description: |
The name you assign to this job definition. It must be unique in your account.
- name: JobMode
value: "{{ JobMode }}"
description: |
A mode that describes how a job was created. Valid values are: SCRIPT - The job was created using the Glue Studio script editor. VISUAL - The job was created using the Glue Studio visual editor. NOTEBOOK - The job was created using an interactive sessions notebook. When the JobMode field is missing or null, SCRIPT is assigned as the default value.
valid_values: ['SCRIPT', 'VISUAL', 'NOTEBOOK']
- name: JobRunQueuingEnabled
value: {{ JobRunQueuingEnabled }}
description: |
Specifies whether job run queuing is enabled for the job runs for this job. A value of true means job run queuing is enabled for the job runs. If false or not populated, the job runs will not be considered for queueing. If this field does not match the value set in the job run, then the value from the job run field will be used.
- name: Description
value: "{{ Description }}"
description: |
Description of the job being defined.
- name: LogUri
value: "{{ LogUri }}"
description: |
This field is reserved for future use.
- name: Role
value: "{{ Role }}"
description: |
The name or Amazon Resource Name (ARN) of the IAM role associated with this job.
- name: ExecutionProperty
description: |
An ExecutionProperty specifying the maximum number of concurrent runs allowed for this job.
value:
MaxConcurrentRuns: {{ MaxConcurrentRuns }}
- name: Command
description: |
The JobCommand that runs this job.
value:
Name: "{{ Name }}"
ScriptLocation: "{{ ScriptLocation }}"
PythonVersion: "{{ PythonVersion }}"
Runtime: "{{ Runtime }}"
- name: DefaultArguments
value: "{{ DefaultArguments }}"
description: |
The default arguments for every run of this job, specified as name-value pairs. You can specify arguments here that your own job-execution script consumes, as well as arguments that Glue itself consumes. Job arguments may be logged. Do not pass plaintext secrets as arguments. Retrieve secrets from a Glue Connection, Secrets Manager or other secret management mechanism if you intend to keep them within the Job. For information about how to specify and consume your own Job arguments, see the Calling Glue APIs in Python topic in the developer guide. For information about the arguments you can provide to this field when configuring Spark jobs, see the Special Parameters Used by Glue topic in the developer guide. For information about the arguments you can provide to this field when configuring Ray jobs, see Using job parameters in Ray jobs in the developer guide.
- name: NonOverridableArguments
value: "{{ NonOverridableArguments }}"
description: |
Arguments for this job that are not overridden when providing job arguments in a job run, specified as name-value pairs.
- name: Connections
description: |
The connections used for this job.
value:
Connections:
- "{{ Connections }}"
- name: MaxRetries
value: {{ MaxRetries }}
description: |
The maximum number of times to retry this job if it fails.
- name: AllocatedCapacity
value: {{ AllocatedCapacity }}
description: |
This parameter is deprecated. Use MaxCapacity instead. The number of Glue data processing units (DPUs) to allocate to this Job. You can allocate a minimum of 2 DPUs; the default is 10. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the Glue pricing page.
- name: Timeout
value: {{ Timeout }}
description: |
The job timeout in minutes. This is the maximum time that a job run can consume resources before it is terminated and enters TIMEOUT status. Jobs must have timeout values less than 7 days or 10080 minutes. Otherwise, the jobs will throw an exception. When the value is left blank, the timeout is defaulted to 2,880 minutes for Glue version 4.0 and earlier, or 480 minutes for Glue version 5.0 and later. Any existing Glue jobs that had a timeout value greater than 7 days will be defaulted to 7 days. For instance if you have specified a timeout of 20 days for a batch job, it will be stopped on the 7th day. For streaming jobs, if you have set up a maintenance window, it will be restarted during the maintenance window after 7 days.
- name: MaxCapacity
value: {{ MaxCapacity }}
description: |
For Glue version 1.0 or earlier jobs, using the standard worker type, the number of Glue data processing units (DPUs) that can be allocated when this job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the Glue pricing page. For Glue version 2.0+ jobs, you cannot specify a Maximum capacity. Instead, you should specify a Worker type and the Number of workers. Do not set MaxCapacity if using WorkerType and NumberOfWorkers. The value that can be allocated for MaxCapacity depends on whether you are running a Python shell job, an Apache Spark ETL job, or an Apache Spark streaming ETL job: When you specify a Python shell job (JobCommand.Name="pythonshell"), you can allocate either 0.0625 or 1 DPU. The default is 0.0625 DPU. When you specify an Apache Spark ETL job (JobCommand.Name="glueetl") or Apache Spark streaming ETL job (JobCommand.Name="gluestreaming"), you can allocate from 2 to 100 DPUs. The default is 10 DPUs. This job type cannot have a fractional DPU allocation.
- name: SecurityConfiguration
value: "{{ SecurityConfiguration }}"
description: |
The name of the SecurityConfiguration structure to be used with this job.
- name: Tags
value: "{{ Tags }}"
description: |
The tags to use with this job. You may use tags to limit access to the job. For more information about tags in Glue, see Amazon Web Services Tags in Glue in the developer guide.
- name: NotificationProperty
description: |
Specifies configuration properties of a job notification.
value:
NotifyDelayAfter: {{ NotifyDelayAfter }}
- name: GlueVersion
value: "{{ GlueVersion }}"
description: |
In Spark jobs, GlueVersion determines the versions of Apache Spark and Python that Glue available in a job. The Python version indicates the version supported for jobs of type Spark. Ray jobs should set GlueVersion to 4.0 or greater. However, the versions of Ray, Python and additional libraries available in your Ray job are determined by the Runtime parameter of the Job command. For more information about the available Glue versions and corresponding Spark and Python versions, see Glue version in the developer guide. Jobs that are created without specifying a Glue version default to Glue 5.1.
- name: NumberOfWorkers
value: {{ NumberOfWorkers }}
description: |
The number of workers of a defined workerType that are allocated when a job runs.
- name: WorkerType
value: "{{ WorkerType }}"
description: |
The type of predefined worker that is allocated when a job runs. Accepts a value of G.1X, G.2X, G.4X, G.8X or G.025X for Spark jobs. Accepts the value Z.2X for Ray jobs. For the G.1X worker type, each worker maps to 1 DPU (4 vCPUs, 16 GB of memory) with 94GB disk, and provides 1 executor per worker. We recommend this worker type for workloads such as data transforms, joins, and queries, to offers a scalable and cost effective way to run most jobs. For the G.2X worker type, each worker maps to 2 DPU (8 vCPUs, 32 GB of memory) with 138GB disk, and provides 1 executor per worker. We recommend this worker type for workloads such as data transforms, joins, and queries, to offers a scalable and cost effective way to run most jobs. For the G.4X worker type, each worker maps to 4 DPU (16 vCPUs, 64 GB of memory) with 256GB disk, and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for Glue version 3.0 or later Spark ETL jobs in the following Amazon Web Services Regions: US East (Ohio), US East (N. Virginia), US West (N. California), US West (Oregon), Asia Pacific (Mumbai), Asia Pacific (Seoul), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Canada (Central), Europe (Frankfurt), Europe (Ireland), Europe (London), Europe (Spain), Europe (Stockholm), and South America (São Paulo). For the G.8X worker type, each worker maps to 8 DPU (32 vCPUs, 128 GB of memory) with 512GB disk, and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for Glue version 3.0 or later Spark ETL jobs, in the same Amazon Web Services Regions as supported for the G.4X worker type. For the G.025X worker type, each worker maps to 0.25 DPU (2 vCPUs, 4 GB of memory) with 84GB disk, and provides 1 executor per worker. We recommend this worker type for low volume streaming jobs. This worker type is only available for Glue version 3.0 or later streaming jobs. For the Z.2X worker type, each worker maps to 2 M-DPU (8vCPUs, 64 GB of memory) with 128 GB disk, and provides up to 8 Ray workers based on the autoscaler.
valid_values: ['Standard', 'G.1X', 'G.2X', 'G.025X', 'G.4X', 'G.8X', 'Z.2X']
- name: CodeGenConfigurationNodes
value: "{{ CodeGenConfigurationNodes }}"
description: |
The representation of a directed acyclic graph on which both the Glue Studio visual component and Glue Studio code generation is based.
- name: ExecutionClass
value: "{{ ExecutionClass }}"
description: |
Indicates whether the job is run with a standard or flexible execution class. The standard execution-class is ideal for time-sensitive workloads that require fast job startup and dedicated resources. The flexible execution class is appropriate for time-insensitive jobs whose start and completion times may vary. Only jobs with Glue version 3.0 and above and command type glueetl will be allowed to set ExecutionClass to FLEX. The flexible execution class is available for Spark jobs.
valid_values: ['FLEX', 'STANDARD']
- name: SourceControlDetails
description: |
The details for a source control configuration for a job, allowing synchronization of job artifacts to or from a remote repository.
value:
Provider: "{{ Provider }}"
Repository: "{{ Repository }}"
Owner: "{{ Owner }}"
Branch: "{{ Branch }}"
Folder: "{{ Folder }}"
LastCommitId: "{{ LastCommitId }}"
AuthStrategy: "{{ AuthStrategy }}"
AuthToken: "{{ AuthToken }}"
- name: MaintenanceWindow
value: "{{ MaintenanceWindow }}"
description: |
This field specifies a day of the week and hour for a maintenance window for streaming jobs. Glue periodically performs maintenance activities. During these maintenance windows, Glue will need to restart your streaming jobs. Glue will restart the job within 3 hours of the specified maintenance window. For instance, if you set up the maintenance window for Monday at 10:00AM GMT, your jobs will be restarted between 10:00AM GMT to 1:00PM GMT.
UPDATE examples
- update_job
- update_job_from_source_control
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;
Synchronizes 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.
UPDATE aws.glue.jobs
SET
JobName = '{{ JobName }}',
Provider = '{{ Provider }}',
RepositoryName = '{{ RepositoryName }}',
RepositoryOwner = '{{ RepositoryOwner }}',
BranchName = '{{ BranchName }}',
Folder = '{{ Folder }}',
CommitId = '{{ CommitId }}',
AuthStrategy = '{{ AuthStrategy }}',
AuthToken = '{{ AuthToken }}'
WHERE
region = '{{ region }}' --required
RETURNING
job_name;
DELETE examples
- delete_job
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
- list_jobs
- reset_job_bookmark
- start_job_run
- update_source_control_from_job
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 }}"
}'
;
Resets 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
EXEC aws.glue.jobs.reset_job_bookmark
@region='{{ region }}' --required
@@json=
'{
"JobName": "{{ JobName }}",
"RunId": "{{ RunId }}"
}'
;
Starts a job run using a job definition.
EXEC aws.glue.jobs.start_job_run
@region='{{ region }}' --required
@@json=
'{
"JobName": "{{ JobName }}",
"JobRunQueuingEnabled": {{ JobRunQueuingEnabled }},
"JobRunId": "{{ JobRunId }}",
"Arguments": "{{ Arguments }}",
"AllocatedCapacity": {{ AllocatedCapacity }},
"Timeout": {{ Timeout }},
"MaxCapacity": {{ MaxCapacity }},
"SecurityConfiguration": "{{ SecurityConfiguration }}",
"NotificationProperty": "{{ NotificationProperty }}",
"WorkerType": "{{ WorkerType }}",
"NumberOfWorkers": {{ NumberOfWorkers }},
"ExecutionClass": "{{ ExecutionClass }}",
"ExecutionRoleSessionPolicy": "{{ ExecutionRoleSessionPolicy }}"
}'
;
Synchronizes 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.
EXEC aws.glue.jobs.update_source_control_from_job
@region='{{ region }}' --required
@@json=
'{
"JobName": "{{ JobName }}",
"Provider": "{{ Provider }}",
"RepositoryName": "{{ RepositoryName }}",
"RepositoryOwner": "{{ RepositoryOwner }}",
"BranchName": "{{ BranchName }}",
"Folder": "{{ Folder }}",
"CommitId": "{{ CommitId }}",
"AuthStrategy": "{{ AuthStrategy }}",
"AuthToken": "{{ AuthToken }}"
}'
;