Conversation
There was a problem hiding this comment.
짧은 시간안에 dw를 snowflake로 선정하고 주제/역할분담 안에서 마무리 잘해주신다고 고생 많이 하셨습니다. README.md도 정리 잘해주셔서 프로젝트 이해하기가 훨씬 좋았던 것 같습니다.
특별히 요구조건에 벗어난 부분은 보이지 않아 간단하게 코멘트만 남겼습니다. (test 용도 dag 3개는 코멘트 남기지 않습니다.)
코스 중에 배운 다른 기술을 종합하여(k8s, spark 등)
- ec2 환경이 아닌 k8s 환경에서 airflow 설치 및 dags 파일 관리를 위한 git-sync 사이드카 설정 방법 학습
- custom operator 작성 (ex. k8s 환경에서 spark 실행시키는 operator를 응용 등)
와 같은 형태로 학습을 심화해서 연습해보시길 바랍니다.
다시 한번 수고하셨습니다!
| @@ -0,0 +1,2 @@ | |||
| #!/bin/sh | |||
| echo "AIRFLOW_UID=$(id -u)" > .env | |||
There was a problem hiding this comment.
uid를 특별히 명시해서 사용한 이유가 있나요?
| @@ -0,0 +1,216 @@ | |||
| from airflow import DAG | |||
| from airflow.operators.python import PythonOperator | |||
| from airflow.operators.dagrun_operator import TriggerDagRunOperator | |||
There was a problem hiding this comment.
사용하고 계신 airflow 2버전대에는 TriggerDagRunOperator 패키지가 다릅니다.
| from airflow.operators.dagrun_operator import TriggerDagRunOperator | |
| from airflow.operators.trigger_dagrun import TriggerDagRunOperator |
| def extract(**context): | ||
| link = context["params"]["url"] | ||
| task_instance = context["task_instance"] | ||
| execution_date = context["execution_date"] |
There was a problem hiding this comment.
실제 사용하지 않는 변수는 생성하지 않는 것이 좋겠습니다. (task_instance, execution_date)
| return weather_data | ||
|
|
||
| def sbike_load_func(**context): | ||
| schema = context["params"]["schema"] |
There was a problem hiding this comment.
실제 사용하지 않는 변수는 생성하지 않는 것이 좋겠습니다. (schema)
| raise | ||
|
|
||
| def weather_load_func(**context): | ||
| schema = context["params"]["schema"] |
There was a problem hiding this comment.
실제 사용하지 않는 변수는 생성하지 않는 것이 좋겠습니다. (schema)
There was a problem hiding this comment.
실제 project에서 사용하는 package들을 requirements.txt에 기재해주시는 것이 좋겠습니다.
ex.
apache-airflow==2.8.0
apache-airflow-providers-snowflake==5.2.1
beautifulsoup4==4.12.2
boto3==1.33.11
botocore==1.33.11
certifi==2023.11.17
charset-normalizer==3.3.2
idna==3.6
jmespath==1.0.1
lxml==4.9.3
PublicDataReader==1.0.25
python-dateutil==2.8.0
python-dotenv==1.0.0
pytz==2023.3.post1
requests==2.31.0
six==1.16.0
soupsieve==2.5
tzdata==2023.3
urllib3==1.26.18
No description provided.