awswrangler.emr.submit_step¶
- awswrangler.emr.submit_step(cluster_id: str, command: str, name: str = 'my-step', action_on_failure: Literal['TERMINATE_JOB_FLOW', 'TERMINATE_CLUSTER', 'CANCEL_AND_WAIT', 'CONTINUE'] = 'CONTINUE', script: bool = False, boto3_session: Session | None = None) str ¶
Submit new job in the EMR Cluster.
- Parameters:
cluster_id (str) – Cluster ID.
command (str) – e.g. ‘echo “Hello!”’ e.g. for script ‘s3://…/script.sh arg1 arg2’
name (str, optional) – Step name.
action_on_failure (str) – ‘TERMINATE_JOB_FLOW’, ‘TERMINATE_CLUSTER’, ‘CANCEL_AND_WAIT’, ‘CONTINUE’
script (bool) – True for raw command or False for script runner. https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-commandrunner.html
boto3_session (boto3.Session(), optional) – Boto3 Session. The default boto3 session will be used if boto3_session receive None.
- Returns:
Step ID.
- Return type:
str
Examples
>>> import awswrangler as wr >>> step_id = wr.emr.submit_step( ... cluster_id=cluster_id, ... name="step_test", ... command="s3://...script.sh arg1 arg2", ... script=True)