Class ScalaSparkFlexEtlJob

java.lang.Object
software.amazon.jsii.JsiiObject
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-10T17:52:11.312Z") @Stability(Experimental) public class ScalaSparkFlexEtlJob extends SparkJob
(experimental) Scala Spark Flex ETL Jobs class.

Flex jobs support Python and Scala languages. The flexible execution class is appropriate for non-urgent jobs such as pre-production jobs, testing, and one-time data loads. Flexible job runs are supported for jobs using AWS Glue version 3.0 or later and G_1X or G_2X worker types but will default to the latest version of Glue (currently Glue 5.0).

Similar to ETL, we’ll enable these features: --enable-metrics, --enable-continuous-cloudwatch-log. The Spark UI (--enable-spark-ui) is off by default; enable it by setting the sparkUI prop.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.glue.alpha.*;
 import software.amazon.awscdk.*;
 import software.amazon.awscdk.services.iam.*;
 import software.amazon.awscdk.services.logs.*;
 import software.amazon.awscdk.services.s3.*;
 Bucket bucket;
 Code code;
 Connection connection;
 LogGroup logGroup;
 Role role;
 SecurityConfiguration securityConfiguration;
 ScalaSparkFlexEtlJob scalaSparkFlexEtlJob = ScalaSparkFlexEtlJob.Builder.create(this, "MyScalaSparkFlexEtlJob")
         .className("className")
         .role(role)
         .script(code)
         // the properties below are optional
         .connections(List.of(connection))
         .continuousLogging(ContinuousLoggingProps.builder()
                 .enabled(false)
                 // the properties below are optional
                 .conversionPattern("conversionPattern")
                 .logGroup(logGroup)
                 .logStreamPrefix("logStreamPrefix")
                 .quiet(false)
                 .build())
         .defaultArguments(Map.of(
                 "defaultArgumentsKey", "defaultArguments"))
         .description("description")
         .enableMetrics(false)
         .enableObservabilityMetrics(false)
         .extraFiles(List.of(code))
         .extraJars(List.of(code))
         .extraJarsFirst(false)
         .glueVersion(GlueVersion.V0_9)
         .jobName("jobName")
         .maxConcurrentRuns(123)
         .maxRetries(123)
         .notifyDelayAfter(Duration.minutes(30))
         .securityConfiguration(securityConfiguration)
         .sparkUI(SparkUIProps.builder()
                 .bucket(bucket)
                 .prefix("prefix")
                 .build())
         .tags(Map.of(
                 "tagsKey", "tags"))
         .timeout(Duration.minutes(30))
         .workerConfiguration(WorkerConfiguration.builder()
                 .numberOfWorkers(123)
                 .workerType(WorkerType.STANDARD)
                 .build())
         .build();
 
  • Field Details

    • PROPERTY_INJECTION_ID

      @Stability(Experimental) public static final String PROPERTY_INJECTION_ID
      (experimental) Uniquely identifies this class.
  • Constructor Details

    • ScalaSparkFlexEtlJob

      protected ScalaSparkFlexEtlJob(software.amazon.jsii.JsiiObjectRef objRef)
    • ScalaSparkFlexEtlJob

      protected ScalaSparkFlexEtlJob(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • ScalaSparkFlexEtlJob

      @Stability(Experimental) public ScalaSparkFlexEtlJob(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ScalaSparkFlexEtlJobProps props)
      (experimental) ScalaSparkFlexEtlJob constructor.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • getJobArn

      @Stability(Experimental) @NotNull public String getJobArn()
      (experimental) The ARN of the job.
      Specified by:
      getJobArn in interface IJob
      Specified by:
      getJobArn in class JobBase
    • getJobName

      @Stability(Experimental) @NotNull public String getJobName()
      (experimental) The name of the job.
      Specified by:
      getJobName in interface IJob
      Specified by:
      getJobName in class JobBase