김학진
@mildsalmon
·
흔치않고, 진귀하다.

카테고리

[Airflow 파먹기] airflow dags list

이 글은 Apache Airflow의 ActionCommand와 dag_list_dags 함수를 살펴보는 내용입니다. ActionCommand는 CLI에서 사용하는 명령어 중 하나로, dag_list_dags 함수는 해당 명령어를 실행했을 때 모든 DAG를 보여주는 함수입니다. 이 함수는 CLI에서 실행되며, 출력 결과는 DAG의 이름, 파일 경로, 소유자, 일시정지 여부 등이 포함됩니다. 또한 이 글에서는 decorator와 alias 등에 대한 이야기도 포함되어 있습니다.

2023년 05월 26일 · 19 min read

[Airflow 파먹기] airflow standalone

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.

2023년 05월 21일 · 19 min read

[Airflow 파먹기] cli_parser

get_parser() 함수는 Airflow CLI의 command line argument parser를 생성하는 함수이다. 이 함수는 lru_cache를 사용하여 속도를 높이고, argparse.ArgumentParser를 상속받는 DefaultHelpParser를 사용하여 help message를 표시한다. 이 함수는 DAG_CLI_DICT 또는 ALL_COMMANDS_DICT를 사용하여 subcommand를 생성하고, core_commands에서 자주 사용하는 명령을 포함한다.

2023년 05월 20일 · 15 min read

[Airflow 파먹기] main - configuration

해당 코드는 Airflow의 환경설정을 담당하는 configuration 파일의 내용을 로드하여 객체로 생성하는 과정을 나타내고 있다. 이를 위해 default_airflow.cfg 파일에서 필요한 값을 읽어오는데, 이 파일은 환경변수를 포함하여 Airflow의 다양한 설정값을 담고 있다. 이 코드는 Airflow의 동작을 이해하는 데 중요한 역할을 하며, Airflow의 소스 코드를 이해하는 데 도움이 될 수 있다.

2023년 05월 14일 · 24 min read