xcoms 4

Airflow XComs Email 전송

Airflow로 Email 전송하는 글을 포스팅했었다. https://pepega.tistory.com/47 블로그 코드는 https://github.com/GHGHGHKO/airflow/blob/master/dags/email_xcom_test.py 전 포스팅 내용을 기반으로 DAG을 만들었다. email_operator = EmailOperator( task_id='send_email', to='receiver@example.com', subject='[TEST] 테스트 메일입니다.', html_content=""" 테스트 메일입니다. ninja template {{ data_interval_start }} {{ ds }} {{ task_instance.xcom_pull(dag_id='postgres..

Airflow 2022.03.18

Airflow OracleOperator Custom 하기

공식 문서를 기반으로 작성하였다. PostgresHook https://airflow.apache.org/docs/apache-airflow-providers-oracle/stable/_modules/airflow/providers/oracle/hooks/oracle.html#OracleHook DbApi https://airflow.apache.org/docs/apache-airflow/stable/_modules/airflow/hooks/dbapi.html#DbApiHook.get_first 하단 코드는 아래에 있다. https://github.com/GHGHGHKO/airflow/commit/47de1fd55ff2be812702ba4539adf54e6d9bd292 OracleOperator 사용 할..

Airflow 2022.03.17

Airflow PostgresOperator Custom 하기

공식 문서를 기반으로 작성하였다. PostgresHook https://airflow.apache.org/docs/apache-airflow-providers-postgres/stable/_api/airflow/providers/postgres/hooks/postgres/index.html#airflow.providers.postgres.hooks.postgres.PostgresHook.conn_name_attr DbApi https://airflow.apache.org/docs/apache-airflow/stable/_modules/airflow/hooks/dbapi.html#DbApiHook.get_first 하단 코드는 아래에 있다. https://github.com/GHGHGHKO/airflow/..

Airflow 2022.03.17