PythonShellExecutableProps

class aws_cdk.aws_glue_alpha.PythonShellExecutableProps(*, glue_version, python_version, script, extra_files=None, extra_python_files=None, runtime=None)

Bases: object

(experimental) Props for creating a Python shell job executable.

Parameters:
  • glue_version (GlueVersion) – (experimental) Glue version.

  • python_version (PythonVersion) – (experimental) The Python version to use.

  • script (Code) – (experimental) The script that executes a job.

  • extra_files (Optional[Sequence[Code]]) – (experimental) Additional files, such as configuration files that AWS Glue copies to the working directory of your script before executing it. Only individual files are supported, directories are not supported. Equivalent to a job parameter --extra-files. Default: [] - no extra files are copied to the working directory

  • extra_python_files (Optional[Sequence[Code]]) – (experimental) Additional Python files that AWS Glue adds to the Python path before executing your script. Only individual files are supported, directories are not supported. Equivalent to a job parameter --extra-py-files. Default: - no extra python files and argument is not set

  • runtime (Optional[Runtime]) – (experimental) Runtime. It is required for Ray jobs.

Stability:

experimental

ExampleMetadata:

infused

Example:

# bucket: s3.Bucket

glue.Job(self, "PythonShellJob",
    executable=glue.JobExecutable.python_shell(
        glue_version=glue.GlueVersion.V1_0,
        python_version=glue.PythonVersion.THREE,
        script=glue.Code.from_bucket(bucket, "script.py")
    ),
    description="an example Python Shell job"
)

Attributes

extra_files

(experimental) Additional files, such as configuration files that AWS Glue copies to the working directory of your script before executing it.

Only individual files are supported, directories are not supported. Equivalent to a job parameter --extra-files.

Default:

[] - no extra files are copied to the working directory

See:

https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html

Stability:

experimental

extra_python_files

(experimental) Additional Python files that AWS Glue adds to the Python path before executing your script.

Only individual files are supported, directories are not supported. Equivalent to a job parameter --extra-py-files.

Default:
  • no extra python files and argument is not set

See:

https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html

Stability:

experimental

glue_version

(experimental) Glue version.

See:

https://docs.aws.amazon.com/glue/latest/dg/release-notes.html

Stability:

experimental

python_version

(experimental) The Python version to use.

Stability:

experimental

runtime

(experimental) Runtime.

It is required for Ray jobs.

Stability:

experimental

script

(experimental) The script that executes a job.

Stability:

experimental