빅데이터(BigData)/Airflow

특정 이름의 파일을 airflow dag에서 제외하기

leebaro 2021. 7. 26.
728x90

airflow dag 파일을 jupyter notebook으로 조회를 하면 checkpoint 파일이 생성되고 airflow admin의 dag 리스트에서 조회되는 것을 확인할 수 있다.

 

이러한 파일들은 .ipynb_checkpoints 디렉토리 안에 존재한다. 이 파일들을 dag 목록에서 보여주지 않으려면 아래와 같이 실행하면 된다.

 

1. dags 디렉토리에 .airflowignore 파일을 생성한다.

2. .airflowignore 파일에 .ipynb_checkpoints를 입력한다. 이 것은 .ipynb_checkpoints 디렉토리 안에 있는 파일들은 모두 dag에서 보여주지 않는다는 의미다.

 


참고

https://stackoverflow.com/questions/53660558/airflow-dag-folder-how-to-ignore-notebook-checkpoints

 

Airflow Dag Folder - How to ignore notebook checkpoints

Airflow is being too clever and trying to pick up dags within the jupyter notebook checkpoints folder "dags/.ipynb_checkpoints/" which is throwing an error. Is there a way to config airflow to ign...

stackoverflow.com

 

728x90