PySparkFlexEtlJobProps
- class aws_cdk.aws_glue.PySparkFlexEtlJobProps(*, role, script, connections=None, continuous_logging=None, default_arguments=None, description=None, glue_version=None, job_name=None, max_concurrent_runs=None, max_retries=None, security_configuration=None, tags=None, timeout=None, enable_metrics=None, enable_observability_metrics=None, spark_ui=None, worker_configuration=None, extra_files=None, extra_jars=None, extra_jars_first=None, extra_python_files=None, notify_delay_after=None)
Bases:
SparkJobPropsProperties for PySparkFlexEtlJob.
- Parameters:
role (
IRole) – IAM Role (required) IAM Role to use for Glue job execution Must be specified by the developer because the L2 doesn’t have visibility into the actions the script(s) takes during the job execution The role must trust the Glue service principal (glue.amazonaws.com) and be granted sufficient permissions.script (
Code) – Script Code Location (required) Script to run when the Glue job executes. Can be uploaded from the local directory structure using fromAsset or referenced via S3 location using fromBucketconnections (
Optional[Sequence[IConnection]]) – Connections (optional) List of connections to use for this Glue job Connections are used to connect to other AWS Service or resources within a VPC. Default: [] - no connections are added to the jobcontinuous_logging (
Union[ContinuousLoggingProps,Dict[str,Any],None]) – Enables continuous logging with the specified props. Default: - continuous logging is enabled.default_arguments (
Optional[Mapping[str,str]]) – Default Arguments (optional) The default arguments for every run of this Glue job, specified as name-value pairs. This map is the escape hatch for Glue job arguments that this construct does not model. It MUST NOT be used to set arguments that already have a dedicated prop — configure those through the corresponding prop instead (continuousLogging,enableMetrics,enableObservabilityMetrics,sparkUI,className,extraJars,extraJarsFirst,extraPythonFiles,extraFiles). Passing a construct-managed argument (e.g.--enable-continuous-cloudwatch-log,--enable-metrics,--enable-spark-ui,--job-language) or a Glue-reserved argument (--debug,--mode,--JOB_NAME,--endpoint) here throws at synthesis time, so there is exactly one way to express each intent. Also note that these are emitted verbatim into the CloudFormation template, so avoid placing secrets here in plaintext. Pass secrets to the job at runtime through AWS Secrets Manager instead. A synthesis-time warning is emitted when an argument key looks like a credential and holds a plaintext literal. Default: - no argumentsdescription (
Optional[str]) – Description (optional) Developer-specified description of the Glue job. Default: - no valueglue_version (
Optional[GlueVersion]) – Glue Version The version of Glue to use to execute this job. Default: - determined by the job type: 4.0 for ETL and Streaming, 5.0 for Flex, 3.0 for Python Shelljob_name (
Optional[str]) – Name of the Glue job (optional) Developer-specified name of the Glue job. Default: - a name is automatically generatedmax_concurrent_runs (
Union[int,float,None]) – Max Concurrent Runs (optional) The maximum number of runs this Glue job can concurrently run. An error is returned when this threshold is reached. The maximum value you can specify is controlled by a service limit. Default: 1max_retries (
Union[int,float,None]) – Max Retries (optional) Maximum number of retry attempts Glue performs if the job fails. Default: 0security_configuration (
Optional[ISecurityConfiguration]) – Security Configuration (optional) Defines the encryption options for the Glue job. Default: - no security configuration.tags (
Optional[Mapping[str,str]]) – Tags (optional) A list of key:value pairs of tags to apply to this Glue job resources. Default: {} - no tagstimeout (
Optional[Duration]) – Timeout (optional) The maximum time that a job run can consume resources before it is terminated and enters TIMEOUT status. Specified in minutes. Default: - no value set; Glue applies its service default (2880 minutes for non-streaming jobs)enable_metrics (
Optional[bool]) – Enable profiling metrics for the Glue job. When enabled, adds ‘–enable-metrics’ to job arguments. Default: trueenable_observability_metrics (
Optional[bool]) – Enable observability metrics for the Glue job. When enabled, adds ‘–enable-observability-metrics’: ‘true’ to job arguments. Default: truespark_ui (
Union[SparkUIProps,Dict[str,Any],None]) – Enables the Spark UI debugging and monitoring with the specified props. Default: - Spark UI debugging and monitoring is disabled.worker_configuration (
Union[WorkerConfiguration,Dict[str,Any],None]) – The worker type and the number of workers allocated when a job runs. Default: - the job runs with the G_1X worker type and 10 workers.extra_files (
Optional[Sequence[Code]]) – Additional files, such as configuration files that AWS Glue copies to the working directory of your script before executing it. Default: - no extra files specified.extra_jars (
Optional[Sequence[Code]]) – Extra Jars S3 URL (optional) S3 URL where additional jar dependencies are located. Default: - no extra jar filesextra_jars_first (
Optional[bool]) – Setting this value to true prioritizes the customer’s extra JAR files in the classpath. Default: false - priority is not given to user-provided jarsextra_python_files (
Optional[Sequence[Code]]) – Extra Python Files S3 URL (optional) S3 URL where additional python dependencies are located. Default: - no extra filesnotify_delay_after (
Optional[Duration]) – Specifies configuration properties of a notification (optional). After a job run starts, the number of minutes to wait before sending a job run delay notification. Default: - undefined
- ExampleMetadata:
infused
Example:
import aws_cdk as cdk import aws_cdk.aws_iam as iam # stack: cdk.Stack # role: iam.IRole # script: glue.Code glue.PySparkFlexEtlJob(stack, "ImportedJob", role=role, script=script)
Attributes
- connections
Connections (optional) List of connections to use for this Glue job Connections are used to connect to other AWS Service or resources within a VPC.
- Default:
[] - no connections are added to the job
- continuous_logging
Enables continuous logging with the specified props.
- Default:
continuous logging is enabled.
- See:
- default_arguments
Default Arguments (optional) The default arguments for every run of this Glue job, specified as name-value pairs.
This map is the escape hatch for Glue job arguments that this construct does not model. It MUST NOT be used to set arguments that already have a dedicated prop — configure those through the corresponding prop instead (
continuousLogging,enableMetrics,enableObservabilityMetrics,sparkUI,className,extraJars,extraJarsFirst,extraPythonFiles,extraFiles). Passing a construct-managed argument (e.g.--enable-continuous-cloudwatch-log,--enable-metrics,--enable-spark-ui,--job-language) or a Glue-reserved argument (--debug,--mode,--JOB_NAME,--endpoint) here throws at synthesis time, so there is exactly one way to express each intent.Also note that these are emitted verbatim into the CloudFormation template, so avoid placing secrets here in plaintext. Pass secrets to the job at runtime through AWS Secrets Manager instead. A synthesis-time warning is emitted when an argument key looks like a credential and holds a plaintext literal.
- Default:
no arguments
- See:
https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html for a list of reserved parameters
- description
Description (optional) Developer-specified description of the Glue job.
- Default:
no value
- enable_metrics
Enable profiling metrics for the Glue job.
When enabled, adds ‘–enable-metrics’ to job arguments.
- Default:
true
- enable_observability_metrics
Enable observability metrics for the Glue job.
When enabled, adds ‘–enable-observability-metrics’: ‘true’ to job arguments.
- Default:
true
- extra_files
Additional files, such as configuration files that AWS Glue copies to the working directory of your script before executing it.
- Default:
no extra files specified.
- See:
- extra_jars
Extra Jars S3 URL (optional) S3 URL where additional jar dependencies are located.
- Default:
no extra jar files
- extra_jars_first
Setting this value to true prioritizes the customer’s extra JAR files in the classpath.
- Default:
false - priority is not given to user-provided jars
- See:
--user-jars-firstin https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html
- extra_python_files
Extra Python Files S3 URL (optional) S3 URL where additional python dependencies are located.
- Default:
no extra files
- glue_version
Glue Version The version of Glue to use to execute this job.
- Default:
determined by the job type: 4.0 for ETL and Streaming, 5.0 for Flex, 3.0 for Python Shell
- job_name
Name of the Glue job (optional) Developer-specified name of the Glue job.
- Default:
a name is automatically generated
- max_concurrent_runs
Max Concurrent Runs (optional) The maximum number of runs this Glue job can concurrently run.
An error is returned when this threshold is reached. The maximum value you can specify is controlled by a service limit.
- Default:
1
- max_retries
Max Retries (optional) Maximum number of retry attempts Glue performs if the job fails.
- Default:
0
- notify_delay_after
Specifies configuration properties of a notification (optional).
After a job run starts, the number of minutes to wait before sending a job run delay notification.
- Default:
undefined
- role
IAM Role (required) IAM Role to use for Glue job execution Must be specified by the developer because the L2 doesn’t have visibility into the actions the script(s) takes during the job execution The role must trust the Glue service principal (glue.amazonaws.com) and be granted sufficient permissions.
- script
Script Code Location (required) Script to run when the Glue job executes.
Can be uploaded from the local directory structure using fromAsset or referenced via S3 location using fromBucket
- security_configuration
Security Configuration (optional) Defines the encryption options for the Glue job.
- Default:
no security configuration.
- spark_ui
Enables the Spark UI debugging and monitoring with the specified props.
- Default:
Spark UI debugging and monitoring is disabled.
- See:
- tags
value pairs of tags to apply to this Glue job resources.
- Default:
{} - no tags
- Type:
Tags (optional) A list of key
- timeout
Timeout (optional) The maximum time that a job run can consume resources before it is terminated and enters TIMEOUT status.
Specified in minutes.
- Default:
no value set; Glue applies its service default (2880 minutes for non-streaming jobs)
- worker_configuration
The worker type and the number of workers allocated when a job runs.
- Default:
the job runs with the G_1X worker type and 10 workers.