Skip to content

Instantly share code, notes, and snippets.

View bjagrelli's full-sized avatar
🏠
Working from home

Breno Jones Agrelli bjagrelli

🏠
Working from home
  • Grupo Boticário
  • Recife, Brazil
  • 19:34 (UTC -03:00)
  • LinkedIn in/bjagrelli
View GitHub Profile
@bjagrelli
bjagrelli / dag_check_status.py
Last active July 30, 2023 18:07
Custom Python script implementing a task triggering solution in Apache Airflow, where downstream tasks execute only if all specified 'extract' tasks complete successfully.
from datetime import datetime
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.python_operator import PythonOperator
from airflow.exceptions import AirflowFailException
# Define the default arguments for the DAG
default_args = {
'owner': 'airflow',
'start_date': datetime(2023, 7, 26),