aws_ddk_core.resources.GlueFactory

class aws_ddk_core.resources.GlueFactory

Class factory to create and configure Glue DDK resources, including Jobs.

__init__()

Methods

__init__()

job(scope, id, environment_id, executable[, ...])

Create and configure Glue job.

static job(scope: constructs.Construct, id: str, environment_id: str, executable: aws_cdk.aws_glue_alpha.JobExecutable, job_name: Optional[str] = None, description: Optional[str] = None, role: Optional[aws_cdk.aws_iam.IRole] = None, security_configuration: Optional[aws_cdk.aws_glue_alpha.ISecurityConfiguration] = None, timeout: Optional[aws_cdk.Duration] = None, worker_count: Optional[int] = None, worker_type: Optional[aws_cdk.aws_glue_alpha.WorkerType] = None, **job_props: Any) aws_cdk.aws_glue_alpha.IJob

Create and configure Glue job.

This construct allows to configure parameters of the job using ddk.json configuration file depending on the environment_id in which the job is used. Supported parameters are: default_arguments,`enable_profiling_metrics`, max_concurrent_runs, max_retries, timeout, worker_count.

The parameters are respected in the following order: 1 - Explicit arguments are always preferred 2 - Values from configuration file 3 - Defaults are used otherwise

Parameters
  • scope (Construct) – Scope within which this construct is defined

  • id (str) – Identifier of the Glue job

  • environment_id (str) – Identifier of the environment

  • executable (JobExecutable) – The job executable properties

  • job_name (Optional[str]) – The name of the Glue job

  • description (Optional[str]) – The description of the Glue job

  • role (Optional[IRole]) – The execution role of the Glue job

  • security_configuration (Optional[ISecurityConfiguration]) – The security configuration of the Glue job. If None, a default configuration is used

  • timeout (Optional[Duration]) – The job execution time (in seconds) after which Glue terminates the job. aws_cdk.Duration.seconds(3600) by default.

  • worker_count (Optional[int]) – The number of workers of a defined WorkerType that are allocated when a job runs

  • worker_type (Optional[WorkerType]) – The type of predefined worker that is allocated when a job runs

  • job_props (Any) – Additional job properties. For complete list of properties refer to CDK Documentation - Glue Job: https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_glue_alpha/Job.html

Returns

job – Glue job

Return type

aws_cdk.aws_glue_alpha.Job