airflow.providers.amazon.aws.sensors.emr_base

Module Contents

class airflow.providers.amazon.aws.sensors.emr_base.EmrBaseSensor(*, aws_conn_id: str = 'aws_default', **kwargs)[source]

Bases: airflow.sensors.base.BaseSensorOperator

Contains general sensor behavior for EMR.

Subclasses should implement following methods:
  • get_emr_response()

  • state_from_response()

  • failure_message_from_response()

Subclasses should set target_states and failed_states fields.

Parameters

aws_conn_id (str) -- aws connection to uses

ui_color = #66c3ff[source]
get_hook(self)[source]

Get EmrHook

poke(self, context)[source]
get_emr_response(self)[source]

Make an API call with boto3 and get response.

Returns

response

Return type

dict[str, Any]

static state_from_response(response: Dict[str, Any])[source]

Get state from response dictionary.

Parameters

response (dict[str, Any]) -- response from AWS API

Returns

state

Return type

str

static failure_message_from_response(response: Dict[str, Any])[source]

Get failure message from response dictionary.

Parameters

response (dict[str, Any]) -- response from AWS API

Returns

failure message

Return type

Optional[str]

Was this entry helpful?