Skip to content

Commit

Permalink
feat(glue): support glue version 4
Browse files Browse the repository at this point in the history
  • Loading branch information
humanzz committed Dec 4, 2022
1 parent b1d8d08 commit ebbb57f
Show file tree
Hide file tree
Showing 9 changed files with 2,125 additions and 166 deletions.
7 changes: 6 additions & 1 deletion packages/@aws-cdk/aws-glue/lib/job-executable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ export class GlueVersion {
*/
public static readonly V3_0 = new GlueVersion('3.0');

/**
* Glue version using Spark 3.3.0 and Python 3.10
*/
public static readonly V4_0 = new GlueVersion('4.0');

/**
* Custom Glue version
* @param version custom version
Expand Down Expand Up @@ -292,7 +297,7 @@ export class JobExecutable {
if (config.language !== JobLanguage.PYTHON) {
throw new Error('Python shell requires the language to be set to Python');
}
if ([GlueVersion.V0_9, GlueVersion.V2_0, GlueVersion.V3_0].includes(config.glueVersion)) {
if ([GlueVersion.V0_9, GlueVersion.V2_0, GlueVersion.V3_0, GlueVersion.V4_0].includes(config.glueVersion)) {
throw new Error(`Specified GlueVersion ${config.glueVersion.name} does not support Python Shell`);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "21.0.0",
"version": "22.0.0",
"files": {
"432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855": {
"source": {
Expand All @@ -14,15 +14,15 @@
}
}
},
"3d4fb124b6f262a7f5f621715b1437dcf5af3450121d622990f89e94fd55d8f5": {
"0985af21379e9d6e1cba091105ecb533ee38a96b4c738816daf17d951a0752b4": {
"source": {
"path": "aws-glue-job.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "3d4fb124b6f262a7f5f621715b1437dcf5af3450121d622990f89e94fd55d8f5.json",
"objectKey": "0985af21379e9d6e1cba091105ecb533ee38a96b4c738816daf17d951a0752b4.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Loading

0 comments on commit ebbb57f

Please sign in to comment.