[Airflow 파먹기] airflow dags list2023년 5월 26일19분이 글은 Apache Airflow의 ActionCommand와 dag_list_dags 함수를 살펴보는 내용입니다. ActionCommand는 CLI에서 사용하는 명령어 중 하나로, dag_list_dags 함수는 해당 명령어를 실행했을 때 모든 DAG를 보여주는 함수입니다. 이 함수는 CLI에서 실행되며, 출력 결과는 DAG의 이름, 파일 경로, 소유자, 일시정지 여부 등이 포함됩니다. 또한 이 글에서는 decorator와 alias 등에 대한 이야기도 포함되어 있습니다.
[Airflow 파먹기] airflow standalone2023년 5월 21일19분Airflow Standalone Command is examined in this content, which allows running all components of Airflow under a single parent process for local development. The code includes the use of @classmethod instead of @staticmethod and the absence of a separate function for entrypoint. The CLI commands for initializing the database and starting the web server and scheduler are executed sequentially. Additionally, the code includes a print_output() function that uses print instead of logger to output colored text.
[Airflow 파먹기] cli_parser2023년 5월 20일15분get_parser() 함수는 Airflow CLI의 command line argument parser를 생성하는 함수이다. 이 함수는 lru_cache를 사용하여 속도를 높이고, argparse.ArgumentParser를 상속받는 DefaultHelpParser를 사용하여 help message를 표시한다. 이 함수는 DAG_CLI_DICT 또는 ALL_COMMANDS_DICT를 사용하여 subcommand를 생성하고, core_commands에서 자주 사용하는 명령을 포함한다.
[Airflow 파먹기] main - configuration2023년 5월 14일24분해당 코드는 Airflow의 환경설정을 담당하는 configuration 파일의 내용을 로드하여 객체로 생성하는 과정을 나타내고 있다. 이를 위해 default_airflow.cfg 파일에서 필요한 값을 읽어오는데, 이 파일은 환경변수를 포함하여 Airflow의 다양한 설정값을 담고 있다. 이 코드는 Airflow의 동작을 이해하는 데 중요한 역할을 하며, Airflow의 소스 코드를 이해하는 데 도움이 될 수 있다.
[Airflow 파먹기] Airflow 코드의 main은?2023년 5월 14일1분airflow 소스코드에서 main 함수를 찾아보고, configuration, cli_parser, arg 등으로 구성된 main 함수의 내용을 다음 포스팅에서 하나씩 살펴보기로 한다.
[Airflow 파먹기] Airflow의 component는 어떻게 실행될까?2023년 5월 13일0분1. Airflow의 component Airflow는 위 그림처럼 5개(scheduler, worker, webserver, meta db, queue)로 구성되어 있다. 이 컴포넌트들이 어떻게 연결되는지 궁금했다.
[Airflow 파먹기] 시작 !2023년 5월 13일2분앞으로 작성할 글들에서 Airflow 코드가 어떻게 구성되어 있고 어떻게 동작하는지 알아보려고 한다. 즉, Airflow가 어떤 것인지에 대해서는 다루지 않는다. Airflow에 대한 설명은 추후에 진행하는 걸로 하고, 코드를 뜯으러 가보자