--- policy: /ce/ca/aws/glue/job-spark-version-support logic: /ce/ca/aws/glue/job-spark-version-support/prod.logic.yaml executionTime: 2026-10-30T18:09:37.525372542Z generationMs: 59 executionMs: 1001 rows: - id: supported-3.0 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: supported-streaming-3.0 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: supported-4.0 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: supported-streaming-4.0 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: supported-5.0 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: supported-streaming-5.0 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: supported-5.1 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: supported-streaming-5.1 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: supported-6.0 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: supported-streaming-6.0 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: eol-0.9 match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 399 actual: 399 conditionText: expected: "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" actual: "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" runtimeError: {} - id: eol-streaming-0.9 match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 399 actual: 399 conditionText: expected: "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" actual: "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" runtimeError: {} - id: eol-1.0 match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 399 actual: 399 conditionText: expected: "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" actual: "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" runtimeError: {} - id: eol-streaming-1.0 match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 399 actual: 399 conditionText: expected: "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" actual: "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" runtimeError: {} - id: eol-2.0 match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 399 actual: 399 conditionText: expected: "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" actual: "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" runtimeError: {} - id: eol-streaming-2.0 match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 399 actual: 399 conditionText: expected: "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" actual: "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" runtimeError: {} - id: unknown-version-1 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: unknown-version-2 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: unknown-version-2.0.1 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: unknown-version-2.1 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: unknown-version-3.1 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: unknown-version-5.10 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: unknown-version-7.0 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: unknown-version-unknown match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: unknown-version- match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 301 actual: 301 conditionText: expected: CA10__glueVersion__c.isEmpty() actual: CA10__glueVersion__c.isEmpty() runtimeError: {} - id: null-version match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 301 actual: 301 conditionText: expected: CA10__glueVersion__c.isEmpty() actual: CA10__glueVersion__c.isEmpty() runtimeError: {} - id: whitespace-version match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 301 actual: 301 conditionText: expected: CA10__glueVersion__c.isEmpty() actual: CA10__glueVersion__c.isEmpty() runtimeError: {} - id: normalized-version match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: shell-old-glue match: true status: expected: INAPPLICABLE actual: INAPPLICABLE conditionIndex: expected: 199 actual: 199 conditionText: expected: "setOfText(['pythonshell', 'glueray']).contains(extract('CA10__commandName__c'))" actual: "setOfText(['pythonshell', 'glueray']).contains(extract('CA10__commandName__c'))" runtimeError: {} - id: shell-missing-glue match: true status: expected: INAPPLICABLE actual: INAPPLICABLE conditionIndex: expected: 199 actual: 199 conditionText: expected: "setOfText(['pythonshell', 'glueray']).contains(extract('CA10__commandName__c'))" actual: "setOfText(['pythonshell', 'glueray']).contains(extract('CA10__commandName__c'))" runtimeError: {} - id: ray-old-glue match: true status: expected: INAPPLICABLE actual: INAPPLICABLE conditionIndex: expected: 199 actual: 199 conditionText: expected: "setOfText(['pythonshell', 'glueray']).contains(extract('CA10__commandName__c'))" actual: "setOfText(['pythonshell', 'glueray']).contains(extract('CA10__commandName__c'))" runtimeError: {} - id: unknown-command match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 299 actual: 299 conditionText: expected: "not(setOfText(['glueetl', 'gluestreaming']).contains(extract('CA10__commandName__c')))" actual: "not(setOfText(['glueetl', 'gluestreaming']).contains(extract('CA10__commandName__c')))" runtimeError: {} - id: null-command match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 101 actual: 101 conditionText: expected: CA10__commandName__c.isEmpty() actual: CA10__commandName__c.isEmpty() runtimeError: {} - id: empty-command match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 101 actual: 101 conditionText: expected: CA10__commandName__c.isEmpty() actual: CA10__commandName__c.isEmpty() runtimeError: {} - id: deleted-legacy-job match: true status: expected: DISAPPEARED actual: DISAPPEARED conditionIndex: expected: 99 actual: 99 conditionText: expected: isDisappeared(CA10__disappearanceTime__c) actual: isDisappeared(CA10__disappearanceTime__c) runtimeError: {} - id: streaming-null-version match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 301 actual: 301 conditionText: expected: CA10__glueVersion__c.isEmpty() actual: CA10__glueVersion__c.isEmpty() runtimeError: {} - id: streaming-missing-version-field match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 301 actual: 301 conditionText: expected: CA10__glueVersion__c.isEmpty() actual: CA10__glueVersion__c.isEmpty() runtimeError: {} - id: streaming-unknown-version match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: ray-missing-glue match: true status: expected: INAPPLICABLE actual: INAPPLICABLE conditionIndex: expected: 199 actual: 199 conditionText: expected: "setOfText(['pythonshell', 'glueray']).contains(extract('CA10__commandName__c'))" actual: "setOfText(['pythonshell', 'glueray']).contains(extract('CA10__commandName__c'))" runtimeError: {} - id: unknown-command-retired-version match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 299 actual: 299 conditionText: expected: "not(setOfText(['glueetl', 'gluestreaming']).contains(extract('CA10__commandName__c')))" actual: "not(setOfText(['glueetl', 'gluestreaming']).contains(extract('CA10__commandName__c')))" runtimeError: {} - id: whitespace-command match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 101 actual: 101 conditionText: expected: CA10__commandName__c.isEmpty() actual: CA10__commandName__c.isEmpty() runtimeError: {} - id: deleted-missing-configuration match: true status: expected: DISAPPEARED actual: DISAPPEARED conditionIndex: expected: 99 actual: 99 conditionText: expected: isDisappeared(CA10__disappearanceTime__c) actual: isDisappeared(CA10__disappearanceTime__c) runtimeError: {} - id: retired-glue10-python-field-ignored match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 399 actual: 399 conditionText: expected: "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" actual: "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" runtimeError: {} - id: supported-spark-python-field-ignored match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 400 actual: 400 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: normalized-retired-streaming match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 399 actual: 399 conditionText: expected: "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" actual: "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" runtimeError: {} usedFiles: - path: /ce/ca/aws/glue/job-spark-version-support/policy.yaml md5Hash: 38F8BF8F0274D4F4D695ED35D4516C03 content: | --- names: full: AWS Glue Spark Job uses a version past end of support contextual: Spark Job uses a version past end of support description: > Migrate Spark batch and streaming job definitions configured with an AWS Glue version past end of support to reduce security and job execution risks. type: BEST_PRACTICE categories: - RELIABILITY frameworkMappings: - /frameworks/cloudaware/resource-reliability/infrastructure-modernization - path: /ce/ca/aws/glue/job-spark-version-support/prod.logic.yaml md5Hash: 72A874357119EECA4DFF5D45508856FE content: | --- inputType: CA10__CaAwsGlueJob__c testData: - file: test-data.json importExtracts: - file: /types/CA10__CaAwsGlueJob__c/object.extracts.yaml conditions: - status: INAPPLICABLE currentStateMessage: The job does not use Spark. check: CONTAINS: arg: SET: itemType: TEXT items: - pythonshell - glueray search: EXTRACT: CA10__commandName__c - status: UNDETERMINED currentStateMessage: The job type is unknown, so Spark runtime support cannot be assessed. check: NOT: arg: CONTAINS: arg: SET: itemType: TEXT items: - glueetl - gluestreaming search: EXTRACT: CA10__commandName__c - status: INCOMPLIANT currentStateMessage: The job uses an AWS Glue version that AWS no longer supports. remediationMessage: Migrate and test the job on a supported AWS Glue version, or retire it if it's no longer needed. check: CONTAINS: arg: SET: itemType: TEXT items: - "0.9" - "1.0" - "2.0" search: EXTRACT: CA10__glueVersion__c otherwise: status: COMPLIANT currentStateMessage: The job uses a supported AWS Glue version. - path: /ce/ca/aws/glue/job-spark-version-support/test-data.json md5Hash: 4BE1977DD5A2B4F337B9A4CB2BEB6F54 content: | [ { "Id": "supported-3.0", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "conditionText": "otherwise", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "3.0" }, { "Id": "supported-streaming-3.0", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "conditionText": "otherwise", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "gluestreaming", "CA10__glueVersion__c": "3.0" }, { "Id": "supported-4.0", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "conditionText": "otherwise", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "4.0" }, { "Id": "supported-streaming-4.0", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "conditionText": "otherwise", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "gluestreaming", "CA10__glueVersion__c": "4.0" }, { "Id": "supported-5.0", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "conditionText": "otherwise", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "5.0" }, { "Id": "supported-streaming-5.0", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "conditionText": "otherwise", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "gluestreaming", "CA10__glueVersion__c": "5.0" }, { "Id": "supported-5.1", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "conditionText": "otherwise", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "5.1" }, { "Id": "supported-streaming-5.1", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "conditionText": "otherwise", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "gluestreaming", "CA10__glueVersion__c": "5.1" }, { "Id": "supported-6.0", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "conditionText": "otherwise", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "6.0" }, { "Id": "supported-streaming-6.0", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "conditionText": "otherwise", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "gluestreaming", "CA10__glueVersion__c": "6.0" }, { "Id": "eol-0.9", "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": 399, "conditionText": "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "0.9" }, { "Id": "eol-streaming-0.9", "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": 399, "conditionText": "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "gluestreaming", "CA10__glueVersion__c": "0.9" }, { "Id": "eol-1.0", "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": 399, "conditionText": "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "1.0" }, { "Id": "eol-streaming-1.0", "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": 399, "conditionText": "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "gluestreaming", "CA10__glueVersion__c": "1.0" }, { "Id": "eol-2.0", "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": 399, "conditionText": "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "2.0" }, { "Id": "eol-streaming-2.0", "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": 399, "conditionText": "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "gluestreaming", "CA10__glueVersion__c": "2.0" }, { "Id": "unknown-version-1", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "runtimeError": null, "conditionText": "otherwise" }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "1" }, { "Id": "unknown-version-2", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "runtimeError": null, "conditionText": "otherwise" }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "2" }, { "Id": "unknown-version-2.0.1", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "runtimeError": null, "conditionText": "otherwise" }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "2.0.1" }, { "Id": "unknown-version-2.1", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "runtimeError": null, "conditionText": "otherwise" }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "2.1" }, { "Id": "unknown-version-3.1", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "runtimeError": null, "conditionText": "otherwise" }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "3.1" }, { "Id": "unknown-version-5.10", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "runtimeError": null, "conditionText": "otherwise" }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "5.10" }, { "Id": "unknown-version-7.0", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "runtimeError": null, "conditionText": "otherwise" }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "7.0" }, { "Id": "unknown-version-unknown", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "runtimeError": null, "conditionText": "otherwise" }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "unknown" }, { "Id": "unknown-version-", "expectedResult": { "status": "UNDETERMINED", "conditionIndex": 301, "conditionText": "CA10__glueVersion__c.isEmpty()", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "" }, { "Id": "null-version", "expectedResult": { "status": "UNDETERMINED", "conditionIndex": 301, "conditionText": "CA10__glueVersion__c.isEmpty()", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": null }, { "Id": "whitespace-version", "expectedResult": { "status": "UNDETERMINED", "conditionIndex": 301, "conditionText": "CA10__glueVersion__c.isEmpty()", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": " " }, { "Id": "normalized-version", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "conditionText": "otherwise", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": " 5.1 " }, { "Id": "shell-old-glue", "expectedResult": { "status": "INAPPLICABLE", "conditionIndex": 199, "conditionText": "setOfText(['pythonshell', 'glueray']).contains(extract('CA10__commandName__c'))", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "pythonshell", "CA10__glueVersion__c": "0.9" }, { "Id": "shell-missing-glue", "expectedResult": { "status": "INAPPLICABLE", "conditionIndex": 199, "conditionText": "setOfText(['pythonshell', 'glueray']).contains(extract('CA10__commandName__c'))", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "pythonshell", "CA10__glueVersion__c": null }, { "Id": "ray-old-glue", "expectedResult": { "status": "INAPPLICABLE", "conditionIndex": 199, "conditionText": "setOfText(['pythonshell', 'glueray']).contains(extract('CA10__commandName__c'))", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueray", "CA10__glueVersion__c": "1.0" }, { "Id": "unknown-command", "expectedResult": { "status": "UNDETERMINED", "conditionIndex": 299, "conditionText": "not(setOfText(['glueetl', 'gluestreaming']).contains(extract('CA10__commandName__c')))", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "TransformData", "CA10__glueVersion__c": "5.0" }, { "Id": "null-command", "expectedResult": { "status": "UNDETERMINED", "conditionIndex": 101, "conditionText": "CA10__commandName__c.isEmpty()", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": null, "CA10__glueVersion__c": "5.0" }, { "Id": "empty-command", "expectedResult": { "status": "UNDETERMINED", "conditionIndex": 101, "conditionText": "CA10__commandName__c.isEmpty()", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "", "CA10__glueVersion__c": "1.0" }, { "Id": "deleted-legacy-job", "expectedResult": { "status": "DISAPPEARED", "conditionIndex": 99, "conditionText": "isDisappeared(CA10__disappearanceTime__c)", "runtimeError": null }, "CA10__disappearanceTime__c": "2026-10-22T00:00:00Z", "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "1.0" }, { "Id": "streaming-null-version", "expectedResult": { "status": "UNDETERMINED", "conditionIndex": 301, "conditionText": "CA10__glueVersion__c.isEmpty()", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "gluestreaming", "CA10__glueVersion__c": null }, { "Id": "streaming-missing-version-field", "expectedResult": { "status": "UNDETERMINED", "conditionIndex": 301, "conditionText": "CA10__glueVersion__c.isEmpty()", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "gluestreaming" }, { "Id": "streaming-unknown-version", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "runtimeError": null, "conditionText": "otherwise" }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "gluestreaming", "CA10__glueVersion__c": "7.0" }, { "Id": "ray-missing-glue", "expectedResult": { "status": "INAPPLICABLE", "conditionIndex": 199, "conditionText": "setOfText(['pythonshell', 'glueray']).contains(extract('CA10__commandName__c'))", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueray", "CA10__glueVersion__c": null }, { "Id": "unknown-command-retired-version", "expectedResult": { "status": "UNDETERMINED", "conditionIndex": 299, "conditionText": "not(setOfText(['glueetl', 'gluestreaming']).contains(extract('CA10__commandName__c')))", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "TransformData", "CA10__glueVersion__c": "2.0" }, { "Id": "whitespace-command", "expectedResult": { "status": "UNDETERMINED", "conditionIndex": 101, "conditionText": "CA10__commandName__c.isEmpty()", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": " \t ", "CA10__glueVersion__c": "5.0" }, { "Id": "deleted-missing-configuration", "expectedResult": { "status": "DISAPPEARED", "conditionIndex": 99, "conditionText": "isDisappeared(CA10__disappearanceTime__c)", "runtimeError": null }, "CA10__disappearanceTime__c": "2026-10-22T00:00:00Z", "CA10__commandName__c": null, "CA10__glueVersion__c": null }, { "Id": "retired-glue10-python-field-ignored", "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": 399, "runtimeError": null, "conditionText": "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "1.0", "CA10__commandPythonVersion__c": "2" }, { "Id": "supported-spark-python-field-ignored", "expectedResult": { "status": "COMPLIANT", "conditionIndex": 400, "conditionText": "otherwise", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": "glueetl", "CA10__glueVersion__c": "5.0", "CA10__commandPythonVersion__c": "2" }, { "Id": "normalized-retired-streaming", "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": 399, "conditionText": "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__commandName__c": " GLUESTREAMING\t", "CA10__glueVersion__c": " 2.0\n" } ] - path: /types/CA10__CaAwsGlueJob__c/object.extracts.yaml md5Hash: 032530E743A93629B7D4A9F64EE7F99E content: | --- extracts: - name: CA10__commandName__c value: FIELD: path: CA10__commandName__c undeterminedIf: isEmpty: The Glue job command is unavailable. - name: CA10__commandPythonVersion__c value: FIELD: path: CA10__commandPythonVersion__c undeterminedIf: isEmpty: The Glue Python shell version is unavailable. - name: CA10__createdOn__c value: FIELD: path: CA10__createdOn__c undeterminedIf: isEmpty: The Glue job creation date is unavailable. - name: CA10__glueVersion__c value: FIELD: path: CA10__glueVersion__c undeterminedIf: isEmpty: The Glue job version is unavailable. - name: CA10__numCompletedTasksSum7d__c value: FIELD: path: CA10__numCompletedTasksSum7d__c undeterminedIf: isEmpty: The 7-day completed-task count is unavailable. - name: CA10__numCompletedTasksSum14d__c value: FIELD: path: CA10__numCompletedTasksSum14d__c undeterminedIf: isEmpty: The 14-day completed-task count is unavailable. - name: CA10__avgAllCpuSystemLoad14d__c value: FIELD: path: CA10__avgAllCpuSystemLoad14d__c undeterminedIf: isEmpty: The 14-day executor CPU utilization is unavailable. - name: CA10__avgAllJvmHeapUsage14d__c value: FIELD: path: CA10__avgAllJvmHeapUsage14d__c undeterminedIf: isEmpty: The 14-day executor JVM heap utilization is unavailable. - name: CA10__avgDriverCpuSystemLoad14d__c value: FIELD: path: CA10__avgDriverCpuSystemLoad14d__c undeterminedIf: isEmpty: The 14-day driver CPU utilization is unavailable. - name: CA10__avgDriverJvmHeapUsage14d__c value: FIELD: path: CA10__avgDriverJvmHeapUsage14d__c undeterminedIf: isEmpty: The 14-day driver JVM heap utilization is unavailable. script: |- CREATE TEMP FUNCTION mock_ExpectedResult() RETURNS ARRAY >> DETERMINISTIC LANGUAGE js AS r""" return [ { "Id" : "supported-3.0", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "conditionText" : "otherwise", "runtimeError" : null } }, { "Id" : "supported-streaming-3.0", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "conditionText" : "otherwise", "runtimeError" : null } }, { "Id" : "supported-4.0", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "conditionText" : "otherwise", "runtimeError" : null } }, { "Id" : "supported-streaming-4.0", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "conditionText" : "otherwise", "runtimeError" : null } }, { "Id" : "supported-5.0", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "conditionText" : "otherwise", "runtimeError" : null } }, { "Id" : "supported-streaming-5.0", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "conditionText" : "otherwise", "runtimeError" : null } }, { "Id" : "supported-5.1", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "conditionText" : "otherwise", "runtimeError" : null } }, { "Id" : "supported-streaming-5.1", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "conditionText" : "otherwise", "runtimeError" : null } }, { "Id" : "supported-6.0", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "conditionText" : "otherwise", "runtimeError" : null } }, { "Id" : "supported-streaming-6.0", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "conditionText" : "otherwise", "runtimeError" : null } }, { "Id" : "eol-0.9", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : 399, "conditionText" : "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))", "runtimeError" : null } }, { "Id" : "eol-streaming-0.9", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : 399, "conditionText" : "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))", "runtimeError" : null } }, { "Id" : "eol-1.0", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : 399, "conditionText" : "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))", "runtimeError" : null } }, { "Id" : "eol-streaming-1.0", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : 399, "conditionText" : "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))", "runtimeError" : null } }, { "Id" : "eol-2.0", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : 399, "conditionText" : "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))", "runtimeError" : null } }, { "Id" : "eol-streaming-2.0", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : 399, "conditionText" : "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))", "runtimeError" : null } }, { "Id" : "unknown-version-1", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "runtimeError" : null, "conditionText" : "otherwise" } }, { "Id" : "unknown-version-2", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "runtimeError" : null, "conditionText" : "otherwise" } }, { "Id" : "unknown-version-2.0.1", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "runtimeError" : null, "conditionText" : "otherwise" } }, { "Id" : "unknown-version-2.1", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "runtimeError" : null, "conditionText" : "otherwise" } }, { "Id" : "unknown-version-3.1", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "runtimeError" : null, "conditionText" : "otherwise" } }, { "Id" : "unknown-version-5.10", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "runtimeError" : null, "conditionText" : "otherwise" } }, { "Id" : "unknown-version-7.0", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "runtimeError" : null, "conditionText" : "otherwise" } }, { "Id" : "unknown-version-unknown", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "runtimeError" : null, "conditionText" : "otherwise" } }, { "Id" : "unknown-version-", "expectedResult" : { "status" : "UNDETERMINED", "conditionIndex" : 301, "conditionText" : "CA10__glueVersion__c.isEmpty()", "runtimeError" : null } }, { "Id" : "null-version", "expectedResult" : { "status" : "UNDETERMINED", "conditionIndex" : 301, "conditionText" : "CA10__glueVersion__c.isEmpty()", "runtimeError" : null } }, { "Id" : "whitespace-version", "expectedResult" : { "status" : "UNDETERMINED", "conditionIndex" : 301, "conditionText" : "CA10__glueVersion__c.isEmpty()", "runtimeError" : null } }, { "Id" : "normalized-version", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "conditionText" : "otherwise", "runtimeError" : null } }, { "Id" : "shell-old-glue", "expectedResult" : { "status" : "INAPPLICABLE", "conditionIndex" : 199, "conditionText" : "setOfText(['pythonshell', 'glueray']).contains(extract('CA10__commandName__c'))", "runtimeError" : null } }, { "Id" : "shell-missing-glue", "expectedResult" : { "status" : "INAPPLICABLE", "conditionIndex" : 199, "conditionText" : "setOfText(['pythonshell', 'glueray']).contains(extract('CA10__commandName__c'))", "runtimeError" : null } }, { "Id" : "ray-old-glue", "expectedResult" : { "status" : "INAPPLICABLE", "conditionIndex" : 199, "conditionText" : "setOfText(['pythonshell', 'glueray']).contains(extract('CA10__commandName__c'))", "runtimeError" : null } }, { "Id" : "unknown-command", "expectedResult" : { "status" : "UNDETERMINED", "conditionIndex" : 299, "conditionText" : "not(setOfText(['glueetl', 'gluestreaming']).contains(extract('CA10__commandName__c')))", "runtimeError" : null } }, { "Id" : "null-command", "expectedResult" : { "status" : "UNDETERMINED", "conditionIndex" : 101, "conditionText" : "CA10__commandName__c.isEmpty()", "runtimeError" : null } }, { "Id" : "empty-command", "expectedResult" : { "status" : "UNDETERMINED", "conditionIndex" : 101, "conditionText" : "CA10__commandName__c.isEmpty()", "runtimeError" : null } }, { "Id" : "deleted-legacy-job", "expectedResult" : { "status" : "DISAPPEARED", "conditionIndex" : 99, "conditionText" : "isDisappeared(CA10__disappearanceTime__c)", "runtimeError" : null } }, { "Id" : "streaming-null-version", "expectedResult" : { "status" : "UNDETERMINED", "conditionIndex" : 301, "conditionText" : "CA10__glueVersion__c.isEmpty()", "runtimeError" : null } }, { "Id" : "streaming-missing-version-field", "expectedResult" : { "status" : "UNDETERMINED", "conditionIndex" : 301, "conditionText" : "CA10__glueVersion__c.isEmpty()", "runtimeError" : null } }, { "Id" : "streaming-unknown-version", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "runtimeError" : null, "conditionText" : "otherwise" } }, { "Id" : "ray-missing-glue", "expectedResult" : { "status" : "INAPPLICABLE", "conditionIndex" : 199, "conditionText" : "setOfText(['pythonshell', 'glueray']).contains(extract('CA10__commandName__c'))", "runtimeError" : null } }, { "Id" : "unknown-command-retired-version", "expectedResult" : { "status" : "UNDETERMINED", "conditionIndex" : 299, "conditionText" : "not(setOfText(['glueetl', 'gluestreaming']).contains(extract('CA10__commandName__c')))", "runtimeError" : null } }, { "Id" : "whitespace-command", "expectedResult" : { "status" : "UNDETERMINED", "conditionIndex" : 101, "conditionText" : "CA10__commandName__c.isEmpty()", "runtimeError" : null } }, { "Id" : "deleted-missing-configuration", "expectedResult" : { "status" : "DISAPPEARED", "conditionIndex" : 99, "conditionText" : "isDisappeared(CA10__disappearanceTime__c)", "runtimeError" : null } }, { "Id" : "retired-glue10-python-field-ignored", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : 399, "runtimeError" : null, "conditionText" : "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))" } }, { "Id" : "supported-spark-python-field-ignored", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : 400, "conditionText" : "otherwise", "runtimeError" : null } }, { "Id" : "normalized-retired-streaming", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : 399, "conditionText" : "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))", "runtimeError" : null } } ]; """; CREATE TEMP FUNCTION mock_CA10__CaAwsGlueJob__c() RETURNS ARRAY >> DETERMINISTIC LANGUAGE js AS r""" return [ { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "3.0", "Id" : "supported-3.0" }, { "CA10__commandName__c" : "gluestreaming", "CA10__glueVersion__c" : "3.0", "Id" : "supported-streaming-3.0" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "4.0", "Id" : "supported-4.0" }, { "CA10__commandName__c" : "gluestreaming", "CA10__glueVersion__c" : "4.0", "Id" : "supported-streaming-4.0" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "5.0", "Id" : "supported-5.0" }, { "CA10__commandName__c" : "gluestreaming", "CA10__glueVersion__c" : "5.0", "Id" : "supported-streaming-5.0" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "5.1", "Id" : "supported-5.1" }, { "CA10__commandName__c" : "gluestreaming", "CA10__glueVersion__c" : "5.1", "Id" : "supported-streaming-5.1" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "6.0", "Id" : "supported-6.0" }, { "CA10__commandName__c" : "gluestreaming", "CA10__glueVersion__c" : "6.0", "Id" : "supported-streaming-6.0" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "0.9", "Id" : "eol-0.9" }, { "CA10__commandName__c" : "gluestreaming", "CA10__glueVersion__c" : "0.9", "Id" : "eol-streaming-0.9" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "1.0", "Id" : "eol-1.0" }, { "CA10__commandName__c" : "gluestreaming", "CA10__glueVersion__c" : "1.0", "Id" : "eol-streaming-1.0" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "2.0", "Id" : "eol-2.0" }, { "CA10__commandName__c" : "gluestreaming", "CA10__glueVersion__c" : "2.0", "Id" : "eol-streaming-2.0" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "1", "Id" : "unknown-version-1" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "2", "Id" : "unknown-version-2" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "2.0.1", "Id" : "unknown-version-2.0.1" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "2.1", "Id" : "unknown-version-2.1" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "3.1", "Id" : "unknown-version-3.1" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "5.10", "Id" : "unknown-version-5.10" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "7.0", "Id" : "unknown-version-7.0" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "unknown", "Id" : "unknown-version-unknown" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "", "Id" : "unknown-version-" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : null, "Id" : "null-version" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : " ", "Id" : "whitespace-version" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : " 5.1 ", "Id" : "normalized-version" }, { "CA10__commandName__c" : "pythonshell", "CA10__glueVersion__c" : "0.9", "Id" : "shell-old-glue" }, { "CA10__commandName__c" : "pythonshell", "CA10__glueVersion__c" : null, "Id" : "shell-missing-glue" }, { "CA10__commandName__c" : "glueray", "CA10__glueVersion__c" : "1.0", "Id" : "ray-old-glue" }, { "CA10__commandName__c" : "TransformData", "CA10__glueVersion__c" : "5.0", "Id" : "unknown-command" }, { "CA10__commandName__c" : null, "CA10__glueVersion__c" : "5.0", "Id" : "null-command" }, { "CA10__commandName__c" : "", "CA10__glueVersion__c" : "1.0", "Id" : "empty-command" }, { "CA10__disappearanceTime__c" : new Date("2026-10-22T00:00:00Z"), "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "1.0", "Id" : "deleted-legacy-job" }, { "CA10__commandName__c" : "gluestreaming", "CA10__glueVersion__c" : null, "Id" : "streaming-null-version" }, { "CA10__commandName__c" : "gluestreaming", "CA10__glueVersion__c" : null, "Id" : "streaming-missing-version-field" }, { "CA10__commandName__c" : "gluestreaming", "CA10__glueVersion__c" : "7.0", "Id" : "streaming-unknown-version" }, { "CA10__commandName__c" : "glueray", "CA10__glueVersion__c" : null, "Id" : "ray-missing-glue" }, { "CA10__commandName__c" : "TransformData", "CA10__glueVersion__c" : "2.0", "Id" : "unknown-command-retired-version" }, { "CA10__commandName__c" : " \t ", "CA10__glueVersion__c" : "5.0", "Id" : "whitespace-command" }, { "CA10__disappearanceTime__c" : new Date("2026-10-22T00:00:00Z"), "CA10__commandName__c" : null, "CA10__glueVersion__c" : null, "Id" : "deleted-missing-configuration" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "1.0", "Id" : "retired-glue10-python-field-ignored" }, { "CA10__commandName__c" : "glueetl", "CA10__glueVersion__c" : "5.0", "Id" : "supported-spark-python-field-ignored" }, { "CA10__commandName__c" : " GLUESTREAMING\t", "CA10__glueVersion__c" : " 2.0\n", "Id" : "normalized-retired-streaming" } ]; """; CREATE TEMP FUNCTION process_CA10__CaAwsGlueJob__c( obj STRUCT< CA10__disappearanceTime__c TIMESTAMP, CA10__commandName__c STRING, CA10__glueVersion__c STRING, Id STRING >, snapshotTime TIMESTAMP ) RETURNS STRUCT DETERMINISTIC LANGUAGE js AS r""" var CollectionLib = new function () { this.parse = function(arg, separator, skipEmpty, skipDuplicates, sort, normalize) { if (arg == null) return []; let parts = arg.split(separator); return this.fromArray(parts, skipEmpty, skipDuplicates, sort, normalize); }; this.fromArray = function(arr, skipEmpty, skipDuplicates, sort, normalize) { if (arr == null) return []; let result = []; let seen = new Set(); arr.forEach(el => { let normalized = normalize ? TextLib.normalize(el) : BytesLib.normalize(el); if (!skipEmpty || (normalize ? TextLib.isNotEmpty(el) : BytesLib.isNotEmpty(el))) { if (!skipDuplicates || !seen.has(normalized)) { if (skipDuplicates) seen.add(normalized); result.push(normalized); } } }); if (sort) result.sort(); return result; }; this.equal = function(left, right) { left = left == null ? [] : left; right = right == null ? [] : right; if (left.length !== right.length) return false; for (let i = 0; i < left.length; i++) { if (left[i] !== right[i]) return false; } return true; }; this.notEqual = function(left, right) { return !this.equal(left, right); }; this.size = function(collection) { return collection == null ? 0 : collection.length; }; this.startsWith = function(collection, search, normalize) { if (collection == null || collection.length === 0) return false; let normalizedSearch = normalize ? TextLib.normalize(search) : BytesLib.normalize(search); return collection[0] === normalizedSearch; }; this.endsWith = function(collection, search, normalize) { if (collection == null || collection.length === 0) return false; let normalizedSearch = normalize ? TextLib.normalize(search) : BytesLib.normalize(search); return collection[collection.length - 1] === normalizedSearch; }; this.contains = function(collection, search, normalize) { if (collection == null || collection.length === 0) return false; return collection.includes(normalize ? TextLib.normalize(search) : BytesLib.normalize(search)); }; this.containsAll = function(collection, searchArray, normalize) { if (collection == null || collection.length === 0 || searchArray == null || searchArray.length === 0) return false; return searchArray.every(search => collection.includes(normalize ? TextLib.normalize(search) : BytesLib.normalize(search))); }; this.containsAny = function(collection, searchArray, normalize) { if (collection == null || collection.length === 0 || searchArray == null || searchArray.length === 0) return false; return searchArray.some(search => collection.includes(normalize ? TextLib.normalize(search) : BytesLib.normalize(search))); }; }(); var BytesLib = new function () { this.normalize = function(arg) { return arg == null ? '' : arg; }; this.isEmpty = function(arg) { return this.normalize(arg) == ''; }; this.isNotEmpty = function(arg) { return this.normalize(arg) != ''; }; this.equal = function(left, right) { return this.normalize(left) == this.normalize(right); }; this.notEqual = function(left, right) { return this.normalize(left) != this.normalize(right); }; this.startsWith = function(arg, substring) { return this.normalize(arg).startsWith(this.normalize(substring)); }; this.endsWith = function(arg, substring) { return this.normalize(arg).endsWith(this.normalize(substring)); }; this.contains = function(arg, substring) { return this.normalize(arg).includes(this.normalize(substring)); }; this.containsAll = function(arg, substrings) { if (substrings == null || substrings.length === 0) return false; let normalizedArg = this.normalize(arg); return substrings.every(sub => normalizedArg.includes(this.normalize(sub))); }; this.containsAny = function(arg, substrings) { if (substrings == null || substrings.length === 0) return false; let normalizedArg = this.normalize(arg); return substrings.some(sub => normalizedArg.includes(this.normalize(sub))); }; }(); var TextLib = new function () { this.normalize = function(arg) { return arg == null ? '' : arg.replace(/\s+/g, ' ').trim().toLowerCase(); }; this.isEmpty = function(arg) { return this.normalize(arg) == ''; }; this.isNotEmpty = function(arg) { return this.normalize(arg) != ''; }; this.equal = function(left, right) { return this.normalize(left) == this.normalize(right); }; this.notEqual = function(left, right) { return this.normalize(left) != this.normalize(right); }; this.startsWith = function(arg, substring) { return this.normalize(arg).startsWith(this.normalize(substring)); }; this.endsWith = function(arg, substring) { return this.normalize(arg).endsWith(this.normalize(substring)); }; this.contains = function(arg, substring) { return this.normalize(arg).includes(this.normalize(substring)); }; this.containsAll = function(arg, substrings) { if (substrings == null || substrings.length === 0) return false; let normalizedArg = this.normalize(arg); return substrings.every(sub => normalizedArg.includes(this.normalize(sub))); }; this.containsAny = function(arg, substrings) { if (substrings == null || substrings.length === 0) return false; let normalizedArg = this.normalize(arg); return substrings.some(sub => normalizedArg.includes(this.normalize(sub))); }; }(); var references1 = []; // condition[0], conditionIndex:[0..99] references1.push('Deleted From AWS [CA10__disappearanceTime__c]: ' + obj.CA10__disappearanceTime__c); if (obj.CA10__disappearanceTime__c != null) { return {status: 'DISAPPEARED', conditionIndex: 99, conditionText: "isDisappeared(CA10__disappearanceTime__c)", currentStateMessage: "Object is deleted in the source", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}; } // condition[1], conditionIndex:[100..199] function fieldChecked4() { if (TextLib.isEmpty(obj.CA10__commandName__c)) { throw new Error("UNDETERMINED condition:101", {cause: {status: 'UNDETERMINED', conditionIndex: 101, conditionText: "CA10__commandName__c.isEmpty()", currentStateMessage: "The Glue job command is unavailable.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}}); } return obj.CA10__commandName__c; } function extract3() { if (!this.out) { this.out = fieldChecked4(); } return this.out; }; references1.push('Command: Name [obj.CA10__commandName__c]: ' + obj.CA10__commandName__c); try { if (CollectionLib.contains(CollectionLib.fromArray(['pythonshell', 'glueray'], true, true, true, true), extract3.call(extract3), true)) { return {status: 'INAPPLICABLE', conditionIndex: 199, conditionText: "setOfText(['pythonshell', 'glueray']).contains(extract('CA10__commandName__c'))", currentStateMessage: "The job does not use Spark.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}; } } catch (err) { if (err.cause && err.cause.status) { return err.cause; } else { throw err; } } // condition[2], conditionIndex:[200..299] function fieldChecked7() { if (TextLib.isEmpty(obj.CA10__commandName__c)) { throw new Error("UNDETERMINED condition:201", {cause: {status: 'UNDETERMINED', conditionIndex: 201, conditionText: "CA10__commandName__c.isEmpty()", currentStateMessage: "The Glue job command is unavailable.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}}); } return obj.CA10__commandName__c; } function extract6() { if (!this.out) { this.out = fieldChecked7(); } return this.out; }; try { if (!CollectionLib.contains(CollectionLib.fromArray(['glueetl', 'gluestreaming'], true, true, true, true), extract6.call(extract6), true)) { return {status: 'UNDETERMINED', conditionIndex: 299, conditionText: "not(setOfText(['glueetl', 'gluestreaming']).contains(extract('CA10__commandName__c')))", currentStateMessage: "The job type is unknown, so Spark runtime support cannot be assessed.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}; } } catch (err) { if (err.cause && err.cause.status) { return err.cause; } else { throw err; } } // condition[3], conditionIndex:[300..399] function fieldChecked10() { if (TextLib.isEmpty(obj.CA10__glueVersion__c)) { throw new Error("UNDETERMINED condition:301", {cause: {status: 'UNDETERMINED', conditionIndex: 301, conditionText: "CA10__glueVersion__c.isEmpty()", currentStateMessage: "The Glue job version is unavailable.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}}); } return obj.CA10__glueVersion__c; } function extract9() { if (!this.out) { this.out = fieldChecked10(); } return this.out; }; references1.push('Glue Version [obj.CA10__glueVersion__c]: ' + obj.CA10__glueVersion__c); try { if (CollectionLib.contains(CollectionLib.fromArray(['0.9', '1.0', '2.0'], true, true, true, true), extract9.call(extract9), true)) { return {status: 'INCOMPLIANT', conditionIndex: 399, conditionText: "setOfText(['0.9', '1.0', '2.0']).contains(extract('CA10__glueVersion__c'))", currentStateMessage: "The job uses an AWS Glue version that AWS no longer supports.", currentStateReferences: references1.join('\n'), remediation: "Migrate and test the job on a supported AWS Glue version, or retire it if it's no longer needed.", runtimeError: null}; } } catch (err) { if (err.cause && err.cause.status) { return err.cause; } else { throw err; } } return {status: 'COMPLIANT', conditionIndex: 400, conditionText: "otherwise", currentStateMessage: "The job uses a supported AWS Glue version.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}; """; SELECT expectedResult.Id as Id, IF ( IFNULL(expectedResult.expectedResult.status, '') = IFNULL(sObject.result.status, '') AND IFNULL(expectedResult.expectedResult.conditionIndex, -1) = IFNULL(sObject.result.conditionIndex, -1) AND IFNULL(expectedResult.expectedResult.conditionText, '') = IFNULL(sObject.result.conditionText, '') AND IFNULL(expectedResult.expectedResult.runtimeError, '') = IFNULL(sObject.result.runtimeError, ''), "MATCH", "FAIL" ) as match, expectedResult.expectedResult.status as expectedStatus, sObject.result.status as actualStatus, expectedResult.expectedResult.conditionIndex as expectedConditionIndex, sObject.result.conditionIndex as actualConditionIndex, expectedResult.expectedResult.conditionText as expectedConditionText, sObject.result.conditionText as actualConditionText, expectedResult.expectedResult.runtimeError as expectedRuntimeError, sObject.result.runtimeError as actualRuntimeError FROM UNNEST(mock_ExpectedResult()) expectedResult LEFT JOIN ( SELECT sObject.CA10__disappearanceTime__c AS CA10__disappearanceTime__c, sObject.CA10__commandName__c AS CA10__commandName__c, sObject.CA10__glueVersion__c AS CA10__glueVersion__c, sObject.Id AS Id, process_CA10__CaAwsGlueJob__c( STRUCT( sObject.CA10__disappearanceTime__c AS CA10__disappearanceTime__c, sObject.CA10__commandName__c AS CA10__commandName__c, sObject.CA10__glueVersion__c AS CA10__glueVersion__c, sObject.Id AS Id ), sObject.context.snapshotTime ) as result FROM UNNEST(mock_CA10__CaAwsGlueJob__c()) AS sObject ) sObject ON sObject.Id = expectedResult.Id;