EmrTerminateJobFlowOperatorTransformer

class ditto.transformers.emr.EmrTerminateJobFlowOperatorTransformer(target_dag, defaults)[source]

Bases: ditto.api.OperatorTransformer

Transforms the operator EmrTerminateJobFlowOperator

Parameters
  • target_dag (DAG) – the target to which the transformed operators must be added

  • defaults (TransformerDefaults) – the default configuration for this transformer

transform(src_operator, parent_fragment, upstream_fragments)[source]

This transformer assumes and relies on the fact that an upstream transformation of a EmrCreateJobFlowOperator has already taken place, since it needs to find the output of that transformation to get the cluster_name and azure_conn_id from that operator (which should have been a AzureHDInsightCreateClusterOperator)

Creates a AzureHDInsightDeleteClusterOperator to terminate the cluster

Return type

DAGFragment