Introduzione ad Apache Airflow in Python
Mike Metzger
Data Engineer

from airflow.providers.standard.operators.hitl import ApprovalOperatorsubject - Oggetto/titolo dell'approvazionebody - Contenuto del messaggioexecution_timeout - timedelta di attesa per la rispostadefaults - Valore predefinito: approve o reject allo scadereassigned_users - Elenco utenti a cui inviare il messaggioapprove_gate = ApprovalOperator(
task_id="approve_data_import",
subject="Data import - Approval Required",
body=(
"Please review the data produced by the *extract_info* task."
"Approve to write data to the database, or Reject to halt the run."
),
)
Nella vista del Dag run, appare RequiredActions se un task che richiede approvazione è in attesa.



Introduzione ad Apache Airflow in Python