{"id":16577472,"url":"https://github.com/alchemine/airflow-dags","last_synced_at":"2026-04-29T15:04:52.472Z","repository":{"id":186778551,"uuid":"675735071","full_name":"alchemine/airflow-dags","owner":"alchemine","description":"Storage for Airflow DAGs","archived":false,"fork":false,"pushed_at":"2023-08-08T04:32:51.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-08T01:06:57.167Z","etag":null,"topics":["airflow","bash","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alchemine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-07T15:47:53.000Z","updated_at":"2023-08-07T16:15:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"183ca4fb-aee5-4c6c-b1e8-58a6bdb6f510","html_url":"https://github.com/alchemine/airflow-dags","commit_stats":null,"previous_names":["alchemine/airflow-dags"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alchemine/airflow-dags","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemine%2Fairflow-dags","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemine%2Fairflow-dags/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemine%2Fairflow-dags/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemine%2Fairflow-dags/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alchemine","download_url":"https://codeload.github.com/alchemine/airflow-dags/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemine%2Fairflow-dags/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32430805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["airflow","bash","python"],"created_at":"2024-10-11T22:10:59.818Z","updated_at":"2026-04-29T15:04:52.466Z","avatar_url":"https://github.com/alchemine.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Airflow-DAGs\nStorage For Airflow DAGs\n\n# 1. [nft-pipeline.py](https://github.com/alchemine/airflow-dags/blob/main/nft-pipeline.py)\n[OpenSea](https://opensea.io)에 올라온 NFT 중 **Doodles** 데이터에 대한 ETL pipeline \n\n```\ncreating_table \u003e\u003e is_api_available \u003e\u003e extract_nft \u003e\u003e process_nft \u003e\u003e store_nft\n```\n\n\n# 2. [agri-price-pipeline](https://github.com/alchemine/airflow-dags/blob/main/agri-price-pipeline.py)\n[aT도매시장 통합홈페이지](https://at.agromarket.kr)에 올라오는 **실시간 경매현황** 중 **수박** 데이터에 대한 ETL pipeline \n\n```\ncheck_weekday \u003e\u003e [initialize, finish]\ninitialize \u003e\u003e create_table \u003e\u003e extract \u003e\u003e transform \u003e\u003e [load, finish]\ntransform \u003e\u003e load \u003e\u003e clean \u003e\u003e finish\n```\n\n## - Point\n1. 날짜 별 분기 설정(`BranchDayOfWeekOperator`)\n2. Transform → Load 과정에서 저장되는 임시 데이터 경로명을 위한 hash값을 xcom으로 DAG 내부에서 공유\n   - Q. 데이터를 저장하지 않고 `@task`를 사용해도 되긴하지만, operator를 쓰고 싶다. 같이 쓸 수 있는 fancy method는 없을까?\n3. 데이터 유효성 검사를 통한 분기 설정(`BranchPythonOperator`)\n4. Jinja를 이용한 `execution_date` 사용\n   - `{{ execution_date | ds }}`\n   - ref. https://airflow.apache.org/docs/apache-airflow/stable/templates-ref.html\n5. Bash command를 이용한 csv file import\n    - `bash_command='echo -e \".separator \",\"\\n.import {{ ti.xcom_pull(key=\"TMP_DATA_PATH\") }} agri_price\" | sqlite3 {{ ti.xcom_pull(key=\"DB_PATH\") }}'`\n    - Q. IDENTITY column은 어떻게?\n6. `initialize` task에서 xcom variable을 추가\n    ```\n    HASH = ... \n    ti.xcom_push(key='DB_PATH',       value=\"/root/airflow/airflow.db\")\n    ti.xcom_push(key='TMP_DATA_PATH', value=f\"/tmp/data-{HASH}.csv\")\n    ```\n7. `initialize \u003e\u003e extract \u003e\u003e transform \u003e\u003e load \u003e\u003e clean \u003e\u003e finish` pipeline은 꽤 완성도가 있는 것 같다.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falchemine%2Fairflow-dags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falchemine%2Fairflow-dags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falchemine%2Fairflow-dags/lists"}