EmrStepSensorTransformer¶
-
class
ditto.transformers.emr.
EmrStepSensorTransformer
(target_dag, defaults)[source]¶ Bases:
ditto.api.OperatorTransformer
Transforms the sensor
EmrStepSensor
- Parameters
target_dag¶ (
DAG
) – the target to which the transformed operators must be addeddefaults¶ (
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 aAzureHDInsightCreateClusterOperator
)This transformer also requires than there would already be transformations of
EmrAddStepsOperator
toLivyBatchOperator
orAzureHDInsightSshOperator
in the upstream_fragments which can then be monitored by the output tasks of this transformer. It needs to search for those ops upstream to find their task IDsAdds
LivyBatchSensor
if it was a livy spark job. There’s no sensor required for a transformedAzureHDInsightSshOperator
as it is synchronous.- Return type