Class PySparkEtlJob
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.glue.JobBase
software.amazon.awscdk.services.glue.Job
software.amazon.awscdk.services.glue.SparkJob
software.amazon.awscdk.services.glue.PySparkEtlJob
- All Implemented Interfaces:
IJobRef,IEnvironmentAware,IResource,IJob,IGrantable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)",
date="2026-09-17T14:54:05.058Z")
@Stability(Stable)
public class PySparkEtlJob
extends SparkJob
PySpark ETL Jobs class.
ETL jobs support pySpark and Scala languages, for which there are separate
but similar constructors. ETL jobs default to the G_1X worker type, but you
can override this default with any other supported WorkerType
(e.g. G_2X, G_4X, G_8X). ETL jobs default to Glue version 4.0, which you
can override to any supported GlueVersion (e.g. 3.0, 5.0, 5.1). The following ETL features are enabled by default:
--enable-metrics, --enable-continuous-cloudwatch-log. The Spark UI
(--enable-spark-ui) is off by default; enable it by setting the sparkUI prop.
You can find more details about version, worker type and other features
in Glue's public documentation.
Example:
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.iam.*;
Stack stack;
IRole role;
Code script;
// Create a job to run from the workflow
PySparkEtlJob job = PySparkEtlJob.Builder.create(stack, "Job").role(role).script(script).build();
// Create a workflow and add a trigger that runs the job
Workflow workflow = new Workflow(stack, "Workflow");
workflow.addOnDemandTrigger("OnDemandTrigger", OnDemandTriggerOptions.builder()
.actions(List.of(Action.job(job)))
.build());
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.glue.IJob
IJob.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPySparkEtlJob(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedPySparkEtlJob(software.amazon.jsii.JsiiObjectRef objRef) PySparkEtlJob(software.constructs.Construct scope, String id, PySparkEtlJobProps props) PySparkEtlJob constructor. -
Method Summary
Modifier and TypeMethodDescriptionThe ARN of the job.The name of the job.Methods inherited from class software.amazon.awscdk.services.glue.SparkJob
getGrantPrincipal, getRole, getSparkUILoggingLocation, nonExecutableCommonArguments, setupExtraCodeArgumentsMethods inherited from class software.amazon.awscdk.services.glue.Job
codeS3ObjectUrl, fromJobAttributes, mergeDefaultArguments, mergeDefaultArguments, setManagedArgument, setManagedArgument, setupContinuousLogging, setupContinuousLogging, setupContinuousLoggingMethods inherited from class software.amazon.awscdk.services.glue.JobBase
buildJobArn, getJobRef, metric, metric, metricFailure, metricFailure, metricSuccess, metricSuccess, metricTimeout, metricTimeout, onEvent, onEvent, onFailure, onFailure, onStateChange, onStateChange, onSuccess, onSuccess, onTimeout, onTimeoutMethods inherited from class software.amazon.awscdk.Resource
applyCrossStackReferenceStrength, applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource, withMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNode, withMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
PySparkEtlJob
protected PySparkEtlJob(software.amazon.jsii.JsiiObjectRef objRef) -
PySparkEtlJob
protected PySparkEtlJob(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
PySparkEtlJob
@Stability(Stable) public PySparkEtlJob(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull PySparkEtlJobProps props) PySparkEtlJob constructor.- Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
getJobArn
The ARN of the job. -
getJobName
The name of the job.- Specified by:
getJobNamein interfaceIJob- Specified by:
getJobNamein classJobBase
-