Dags
-
[Airflow] - Concept개발/Airflow 2022. 8. 3. 15:40
Airflow Default Concept 1. Operator An Operator is conceptually a template for a predefined Task, that you can just define declaratively inside your DAG For a list of all core operators(built-in) BashOperator - executes a bash command PythonOperator - calls an arbitrary Python function EmailOperator - sends an email with DAG("my-dag") as dag: ping = SimpleHttpOperator(endpoint="http://example.co..
-
[Airflow] - what is Airflow개발/Airflow 2022. 7. 30. 00:56
Airflow Airflow is a platform to programmatically author, schedule and monitor workflows. Use Airflow to author workflows as Directed Acyclic Graphs (DAGs) of tasks The Airflow scheduler executes your tasks on an array of workers while following the specified dependencies. Airflow is not a data streaming(data load like image,youtube ) solution. Principles 1. Dynamic Airflow pipelines are configu..
-
[Airflow] - 3. Dags(Python operator)개발/Airflow 2022. 7. 8. 17:36
Dag 파일을 만들어보고 Workflow를 Pythonoperator로 구현하는 예시를 보여드릴 예정입니다. 틀린 내용이 있을 수 있으니 상세한 부분 Document를 참고하시는 것을 추천 드립니다. 1. Dag 생성 Dag file을 생성하기 위해서는 일단 Ubuntu의 Dags 폴더 File을 들어갑니다. 왜 Dag 폴더를 이용하는 가는 실제 Docker Container가 실행되면 dags / logs / plugins 폴더를 Mount 하여 가져갑니다. ( 이부분은 Docker Container를 직접 접속하셔서 /opt/airflow/dags 에 들어가시면 확인 할 수 있습니다. ) 후에 Dag를 만들 Test.py 파일을 만듭니다. $ cd /dags $ sudo vi test.py 이제부터는..
-
[Airflow] 2. Vscode로 Dags 관리개발/Airflow 2022. 7. 3. 18:01
매번 Linux Vi 로 Code를 관리하기에 번거로움이 있어 Vscode로 접속하여 코드를 작성하는 방법을 공유드리려고 합니다. 1. wsl에서 아래와 같은 명령어를 칩니다. explorer.exe . 2. 아래 해당되는 위치가 Dags를 넣는 위치임으로 Vscode에서 아래 경로로 열어주어 코드를 작성하면 됩니다. 3. Permission Denied가 발생 시 권한을 변경하여 관리할 수 있도록 하여 줍니다. $ sudo chown -R User File_name #Example $ sudo chown -R kimuksung2 test.py