Skip to content

Commit ca01a25

Browse files
authored
feat(glue): support AWS Glue 5.0 (#32467)
### Issue # (if applicable) N/A ### Reason for this change Glue supported ver 5.0. Ref: [Introducing AWS Glue 5.0](https://aws.amazon.com/about-aws/whats-new/2024/12/aws-glue-5-0/) ### Description of changes Add Enum. ### Description of how you validated changes Update an unit test and an integ test. ### Checklist - [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent c23be8c commit ca01a25

File tree

8 files changed

+1094
-27
lines changed

8 files changed

+1094
-27
lines changed

packages/@aws-cdk/aws-glue-alpha/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ An ETL job processes data in batches using Apache Spark.
4141
declare const bucket: s3.Bucket;
4242
new glue.Job(this, 'ScalaSparkEtlJob', {
4343
executable: glue.JobExecutable.scalaEtl({
44-
glueVersion: glue.GlueVersion.V4_0,
44+
glueVersion: glue.GlueVersion.V5_0,
4545
script: glue.Code.fromBucket(bucket, 'src/com/example/HelloWorld.scala'),
4646
className: 'com.example.HelloWorld',
4747
extraJars: [glue.Code.fromBucket(bucket, 'jars/HelloWorld.jar')],
@@ -58,7 +58,7 @@ A Streaming job is similar to an ETL job, except that it performs ETL on data st
5858
```ts
5959
new glue.Job(this, 'PythonSparkStreamingJob', {
6060
executable: glue.JobExecutable.pythonStreaming({
61-
glueVersion: glue.GlueVersion.V4_0,
61+
glueVersion: glue.GlueVersion.V5_0,
6262
pythonVersion: glue.PythonVersion.THREE,
6363
script: glue.Code.fromAsset(path.join(__dirname, 'job-script', 'hello_world.py')),
6464
}),
@@ -94,7 +94,7 @@ These jobs run in a Ray environment managed by AWS Glue.
9494
```ts
9595
new glue.Job(this, 'RayJob', {
9696
executable: glue.JobExecutable.pythonRay({
97-
glueVersion: glue.GlueVersion.V4_0,
97+
glueVersion: glue.GlueVersion.V5_0,
9898
pythonVersion: glue.PythonVersion.THREE_NINE,
9999
runtime: glue.Runtime.RAY_TWO_FOUR,
100100
script: glue.Code.fromAsset(path.join(__dirname, 'job-script', 'hello_world.py')),
@@ -137,7 +137,7 @@ Enable job run queuing by setting the `jobRunQueuingEnabled` property to `true`.
137137
new glue.Job(this, 'EnableRunQueuing', {
138138
jobName: 'EtlJobWithRunQueuing',
139139
executable: glue.JobExecutable.pythonEtl({
140-
glueVersion: glue.GlueVersion.V4_0,
140+
glueVersion: glue.GlueVersion.V5_0,
141141
pythonVersion: glue.PythonVersion.THREE,
142142
script: glue.Code.fromAsset(path.join(__dirname, 'job-script', 'hello_world.py')),
143143
}),
@@ -488,7 +488,7 @@ new glue.S3Table(this, 'MyTable', {
488488
declare const myDatabase: glue.Database;
489489
// KMS key is created automatically
490490
new glue.S3Table(this, 'MyTable', {
491-
encryption: glue.TableEncryption.CLIENT_SIDE_KMS,
491+
encryption: glue.TableEncryption.CLIENT_SIDE_KMS,
492492
// ...
493493
database: myDatabase,
494494
columns: [{
@@ -546,7 +546,7 @@ new glue.S3Table(this, 'MyTable', {
546546
// ...
547547
database: myDatabase,
548548
dataFormat: glue.DataFormat.JSON,
549-
});
549+
});
550550
```
551551

552552
### Primitives

packages/@aws-cdk/aws-glue-alpha/lib/job-executable.ts

+8
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,19 @@ import { Code } from './code';
1111
export class GlueVersion {
1212
/**
1313
* Glue version using Spark 2.2.1 and Python 2.7
14+
* @deprecated Reached end of support
1415
*/
1516
public static readonly V0_9 = new GlueVersion('0.9');
1617

1718
/**
1819
* Glue version using Spark 2.4.3, Python 2.7 and Python 3.6
20+
* @deprecated Reached end of support
1921
*/
2022
public static readonly V1_0 = new GlueVersion('1.0');
2123

2224
/**
2325
* Glue version using Spark 2.4.3 and Python 3.7
26+
* @deprecated Reached end of support
2427
*/
2528
public static readonly V2_0 = new GlueVersion('2.0');
2629

@@ -34,6 +37,11 @@ export class GlueVersion {
3437
*/
3538
public static readonly V4_0 = new GlueVersion('4.0');
3639

40+
/**
41+
* Glue version using Spark 3.5.2 and Python 3.11
42+
*/
43+
public static readonly V5_0 = new GlueVersion('5.0');
44+
3745
/**
3846
* Custom Glue version
3947
* @param version custom version

packages/@aws-cdk/aws-glue-alpha/test/integ.job.js.snapshot/aws-glue-job.assets.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)