묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결Airflow 마스터 클래스
앱비밀번호 설정하는 방법에 대해
안녕하세요?【16 Email Operator로 메일 전송하기 강의】에서 앱비밀번호 설정하는 작업이 있는데,Google 보안에 들어가도 앱비밀번호라는 항목 자체가 없습니다.어떻게 설정하는 되는지 방법을 알려주시면 감사하겠습니다.
-
미해결실리콘밸리 데이터 리더가 알려주는 Airflow 기초
Window11 Home 버전 도커 설치 방법 - Docker Desktop - Unexpected WSL error
아래와 같은 내용을 모르고 Win11 Home 버전에서 도커 설치에 여러가지 시행 착오를 겪고 Windows 11 Home 버전에서도 Hyper-V를 활성화해서 도커 설치에 성공한 방법을 공유드립니다. Windows 10 Pro, Enterprise 및 Education 64비트 버전에서만 사용할 수 있고 Home 버전에서는 사용할 수 없습니다.특히 Docker Desktop for Windows 설치를 위해서는 반드시 Hyper-V를 지원하는 OS가 필요하지만 Home 버전에서는 Hyper-V 기능을 사용할 수 없는 탓에 Docker Toolbox(Virtual Box)를 이용한 가상화를 통해서만 Docker를 설치할 수 있습니다. 참고 사이트https://forbes.tistory.com/542#google_vignette 1. 도커 에러 -> WSL2 설치 -> 도커 실행 X 2. Ubuntu 실행 에러Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x800701bc Error: 0x800701bc WSL 2? ?? ?? ?? ????? ?????. ??? ??? https://aka.ms/wsl2kernel? ??????. Press any key to continue...-> Windows 기능 켜기-> 도커 실행 XLinux용 Windows 하위 시스템Windows - 하이퍼바이저 플랫폼(Hyper-V)가상 머신 플랫폼참고 사이트https://mi2mic.tistory.com/228 3. Hyper-V 활성화 참고 사이트https://geekorea.com/how-to-enable-hyper-v-windows11-home/ 4. 도커 설치 완료
-
미해결Airflow 마스터 클래스
Airflow 설치 후 화면 에러
wsl에서 docker설치하고, airflow를 설치해서, localhost:8080으로 들어갔는데 화면에 아래와 같은 애러가 뜨면서, Dag화면이 안뜨는 상태입니다.해결방법에 대해 말씀해주시면 감사하겠습니다.화면 에러내용에러내용/home/airflow/.local/lib/python3.12/site-packages/airflow/example_dags/standard/example_external_task_parent_deferrable.py Timestamp: 2025-07-13, 06:22:35 Traceback (most recent call last): File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed File "/home/airflow/.local/lib/python3.12/site-packages/airflow/example_dags/standard/example_external_task_parent_deferrable.py", line 60, in <module> from tests_common.test_utils.watcher import watcher ModuleNotFoundError: No module named 'tests_common'
-
미해결Airflow 마스터 클래스
chatGPT API 실습은 이제 유료인 거 맞나요??
안녕하세요 강사님 수업 잘 듣고 있습니다!다름이 아니라 이제 chatGPT API 강의를 듣고 있는데print(resp.text)에서 에러가 계속 나서 보니5$이상 결제를 해야 API 이용이 가능하다는 말이 있어서 혹시 맞는지 확인 부탁드립니다..!
-
해결됨Airflow 마스터 클래스
강의 수강간 Airflow 버전 문의
안녕하세요 강의 수강중인데 어떤 버전으로 진행하면되는지 문의드리고자.현재 '섹션 2. Airflow 설치' 부분에 '5. 도커&에어플로우 설치'를 강의를 듣고 있습니다. 강의 도입부에 airflow 설치시 2.10.5 버전으로 설치 부탁하셨는데, 강의 중반부에 Airflow 3대 버전으로 영상이 업데이트 완료되어 최신 버전 docker-compose.yaml 로 설치하라고 안내해주셔서요. 어떤 버전으로 강의를 진행하면될까요?
-
미해결Airflow 마스터 클래스
더이상 airflow web에 dag 파일이 안 올라갑니다ㅜㅜ
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Basic Airflow cluster configuration for CeleryExecutor with Redis and PostgreSQL. # # WARNING: This configuration is for local development. Do not use it in a production deployment. # # This configuration supports basic configuration using environment variables or an .env file # The following variables are supported: # # AIRFLOW_IMAGE_NAME - Docker image name used to run Airflow. # Default: apache/airflow:3.0.2 # AIRFLOW_UID - User ID in Airflow containers # Default: 50000 # AIRFLOW_PROJ_DIR - Base path to which all the files will be volumed. # Default: . # Those configurations are useful mostly in case of standalone testing/running Airflow in test/try-out mode # # _AIRFLOW_WWW_USER_USERNAME - Username for the administrator account (if requested). # Default: airflow # _AIRFLOW_WWW_USER_PASSWORD - Password for the administrator account (if requested). # Default: airflow # _PIP_ADDITIONAL_REQUIREMENTS - Additional PIP requirements to add when starting all containers. # Use this option ONLY for quick checks. Installing requirements at container # startup is done EVERY TIME the service is started. # A better way is to build a custom image or extend the official image # as described in https://airflow.apache.org/docs/docker-stack/build.html. # Default: '' # # Feel free to modify this file to suit your needs. --- x-airflow-common: &airflow-common # In order to add custom dependencies or upgrade provider distributions you can use your extended image. # Comment the image line, place your Dockerfile in the directory where you placed the docker-compose.yaml # and uncomment the "build" line below, Then run `docker-compose build` to build the images. image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:3.0.2} # build: . environment: &airflow-common-env AIRFLOW__CORE__EXECUTOR: CeleryExecutor AIRFLOW__CORE__AUTH_MANAGER: airflow.providers.fab.auth_manager.fab_auth_manager.FabAuthManager AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/airflow AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:airflow@postgres/airflow AIRFLOW__CELERY__BROKER_URL: redis://:@redis:6379/0 AIRFLOW__CORE__FERNET_KEY: '' AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION: 'true' AIRFLOW__CORE__LOAD_EXAMPLES: 'true' AIRFLOW__CORE__EXECUTION_API_SERVER_URL: 'http://airflow-apiserver:8080/execution/' # yamllint disable rule:line-length # Use simple http server on scheduler for health checks # See https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/logging-monitoring/check-health.html#scheduler-health-check-server # yamllint enable rule:line-length AIRFLOW__SCHEDULER__ENABLE_HEALTH_CHECK: 'true' # WARNING: Use _PIP_ADDITIONAL_REQUIREMENTS option ONLY for a quick checks # for other purpose (development, test and especially production usage) build/extend Airflow image. _PIP_ADDITIONAL_REQUIREMENTS: ${_PIP_ADDITIONAL_REQUIREMENTS:-} # The following line can be used to set a custom config file, stored in the local config folder AIRFLOW_CONFIG: '/opt/airflow/config/airflow.cfg' volumes: - ${AIRFLOW_PROJ_DIR:-.}/airflow/dags:/opt/airflow/dags - ${AIRFLOW_PROJ_DIR:-.}/logs:/opt/airflow/logs - ${AIRFLOW_PROJ_DIR:-.}/config:/opt/airflow/config - ${AIRFLOW_PROJ_DIR:-.}/airflow/plugins:/opt/airflow/plugins - ${AIRFLOW_PROJ_DIR:-.}/airflow/files:/opt/airflow/files user: "${AIRFLOW_UID:-50000}:0" depends_on: &airflow-common-depends-on redis: condition: service_healthy postgres: condition: service_healthy services: postgres_custom: image: postgres:13 environment: POSTGRES_USER: leeyujin POSTGRES_PASSWORD: leeyujin POSTGRES_DB: leeyujin volumes: - postgres-custom-db-volume:/var/lib/postgresql/data ports: - 5432:5432 networks: network_custom: ipv4_address: 172.28.0.3 postgres: image: postgres:13 environment: POSTGRES_USER: airflow POSTGRES_PASSWORD: airflow POSTGRES_DB: airflow volumes: - postgres-db-volume:/var/lib/postgresql/data healthcheck: test: ["CMD", "pg_isready", "-U", "airflow"] interval: 10s retries: 5 start_period: 5s restart: always ports: - 5431:5432 networks: network_custom: ipv4_address: 172.28.0.4 redis: # Redis is limited to 7.2-bookworm due to licencing change # https://redis.io/blog/redis-adopts-dual-source-available-licensing/ image: redis:7.2-bookworm expose: - 6379 healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 30s retries: 50 start_period: 30s restart: always networks: network_custom: ipv4_address: 172.28.0.5 airflow-apiserver: <<: *airflow-common command: api-server ports: - "8080:8080" healthcheck: test: ["CMD", "curl", "--fail", "http://localhost:8080/api/v2/version"] interval: 30s timeout: 10s retries: 5 start_period: 30s restart: always depends_on: <<: *airflow-common-depends-on airflow-init: condition: service_completed_successfully networks: network_custom: ipv4_address: 172.28.0.6 airflow-scheduler: <<: *airflow-common command: scheduler healthcheck: test: ["CMD", "curl", "--fail", "http://localhost:8974/health"] interval: 30s timeout: 10s retries: 5 start_period: 30s restart: always depends_on: <<: *airflow-common-depends-on airflow-init: condition: service_completed_successfully networks: network_custom: ipv4_address: 172.28.0.7postgres 실습 때문에 yaml 파일 수정 후부터 만든 모든 파일이 web ui에 안 올라가져요..git을 통해 로컬이나 컨테이너 각 디렉토리에는 파일들이 잘 들어가있습니다.dag 파일 코드 오류일까봐 이미 올라가져있던 파일 코드 복붙해서 test_dag.py를 만들었는데 그것도 안 올라갑니다ㅜㅜ..
-
해결됨Airflow 마스터 클래스
bashoperator는 t1.xcom_push가 안되나요?
import pendulum from airflow.providers.standard.operators.bash import BashOperator from airflow.sdk import DAG with DAG( dag_id="dags_bash_with_xcom", schedule="10 0 * * *", start_date=pendulum.datetime(2023, 3, 1, tz="Asia/Seoul"), catchup=False ) as dag: bash_push=BashOperator( task_id='bash_push', bash_command="echo START && " "echo XCOM_PUSHED " "{{ti.xcom_push(key='bash_pushed',value='first_bash_message') }} && " "echo COMPLETE" ) bash_pull=BashOperator( task_id='bash_pull', env={'PUSHED_VALUE':"{{ti.xcom_pull(key='bash_pushed')}}", 'RETURN_VALUE':"{{ti.xcom_pull(task_ids='bash_push')}}"}, bash_command="echo $PUSHED_VALUE && echo $RETURN_VALUE", do_xcom_push=False ) bash_push >> bash_pull이게 제가 돌린 코드입니다. 근데 PUSHED_VALUE값이 나오지 않습니다.아래는 관련 로그입니다. [2025-07-04, 10:31:39] INFO - DAG bundles loaded: dags-folder, example_dags: source="airflow.dag_processing.bundles.manager.DagBundlesManager"[2025-07-04, 10:31:39] INFO - Filling up the DagBag from /opt/airflow/dags/dags_bash_with_xcom.py: source="airflow.models.dagbag.DagBag"[2025-07-04, 10:31:39] WARNING - No XCom value found; defaulting to None.: key="bash_pushed": dag_id="dags_bash_with_xcom": task_id="bash_pull": run_id="manual__2025-07-04T01:31:36.786102+00:00": map_index=-1: source="task"[2025-07-04, 10:31:39] INFO - Tmp dir root location: /tmp: source="airflow.task.hooks.airflow.providers.standard.hooks.subprocess.SubprocessHook"[2025-07-04, 10:31:39] INFO - Running command: ['/usr/bin/bash', '-c', 'echo $PUSHED_VALUE && echo $RETURN_VALUE']: source="airflow.task.hooks.airflow.providers.standard.hooks.subprocess.SubprocessHook"[2025-07-04, 10:31:39] INFO - Output:: source="airflow.task.hooks.airflow.providers.standard.hooks.subprocess.SubprocessHook"[2025-07-04, 10:31:39] INFO - None: source="airflow.task.hooks.airflow.providers.standard.hooks.subprocess.SubprocessHook"[2025-07-04, 10:31:39] INFO - COMPLETE: source="airflow.task.hooks.airflow.providers.standard.hooks.subprocess.SubprocessHook"[2025-07-04, 10:31:39] INFO - Command exited with return code 0: source="airflow.task.hooks.airflow.providers.standard.hooks.subprocess.SubprocessHook"[2025-07-04, 10:31:39] INFO - Task instance is in running state: chan="stdout": source="task"[2025-07-04, 10:31:39] INFO - Previous state of the Task instance: TaskInstanceState.QUEUED: chan="stdout": source="task"[2025-07-04, 10:31:39] INFO - Current task name:bash_pull: chan="stdout": source="task"[2025-07-04, 10:31:39] INFO - Dag name:dags_bash_with_xcom: chan="stdout": source="task"[2025-07-04, 10:31:39] INFO - Task instance in success state: chan="stdout": source="task"[2025-07-04, 10:31:39] INFO - Previous state of the Task instance: TaskInstanceState.RUNNING: chan="stdout": source="task"[2025-07-04, 10:31:39] INFO - Task operator:<Task(BashOperator): bash_pull>: chan="stdout": source="task"
-
미해결Airflow 마스터 클래스
버전이 달라서 dict 호출이 안되는 거 맞나요??
import pendulum from airflow.sdk import DAG, task with DAG( dag_id="dags_python_with_macro", schedule="10 0 * * *", start_date=pendulum.datetime(2023, 3, 1, tz="Asia/Seoul"), catchup=False ) as dag: @task(task_id='task_using_macros', templates_dict={'start_date':'{{(data_interval_end.in_timezone("Asia/Seoul") + macros.dateutil.relativedelta.relativedelta(months=-1, day=1)) | ds }}', 'end_date': '{{(data_interval_end.in_timezone("Asia/Seoul").replace(day=1) + macros.dateutil.relativedelta.relativedelta(days=-1)) | ds }}' } ) def get_datetime_macro(**kwargs): templates_dict=kwargs.get('templates_dict') or {} if templates_dict: start_date=templates_dict.get('start_date') or 'start_date 없음' end_date=templates_dict.get('end_date') or 'end_date 없음' print(start_date) print(end_date) @task(task_id='task_direct_calc') def get_datetime_calc(**kwargs): from dateutil.relativedelta import relativedelta data_interval_end=kwargs['data_interval_end'] prev_month_day_first=data_interval_end.in_timezone('Asia/Seoul') + relativedelta(months=-1,day=1) prev_month_day_last = data_interval_end.in_timezone('Asia/Seoul').replace(day=1) + relativedelta(days=-1) print(prev_month_day_first.strftime('%Y-%m-%d')) print(prev_month_day_last.strftime('%Y-%m-%d')) get_datetime_macro() >> get_datetime_calc()수업 내용에 따라서 했는데 17번줄에서 오류가 나서 딕셔너리 호출을 못한다고 합니다. chat gpt한테 물어보니 이제는 인자로 호출을 해야한다고해서..맞는지 확인 부탁드립니다.
-
미해결Airflow 마스터 클래스
[초보 질문 ]git pull의 필요성
로컬 Windows 환경에서 Airflow DAG 파일을 만들고 Git Push를 한 후, WSL 루트경로에서 다시 Git Pull을 받아 Docker Compose up을 하는 식으로 이해했는데요. 왜 wsl에 루트경로에서 git pull을 받나요? wsl과 windows가 분리됐다고 해도 wsl에서도 windows에서 작업했던 디렉토리에 접근할 수 있지 않나요? 그러면 git pull을 굳이 하지 않아도 되지 않나요?
-
미해결Airflow 마스터 클래스
connection type 추가하기중 docker image 생성 오류
강사님, 버전문제로 설치가 안되는것 같은데,어디서 upgrade를 해야 하나요? [+] Building 10.9s (6/7) docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 483B 0.0s => [internal] load metadata for docker.io/apache/airflow:2.10.5 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [1/4] FROM docker.io/apache/airflow:2.10.5 0.0s => CACHED [2/4] RUN apt-get update && apt-get install -y --no-install-recommends gcc heimdal-dev g++ libsasl2-dev && apt-get 0.0s => ERROR [3/4] RUN pip install pip install apache-airflow-providers-apache-hdfs pip install apache-airflow-providers-apache-hive 10.6s------ > [3/4] RUN pip install pip install apache-airflow-providers-apache-hdfs pip install apache-airflow-providers-apache-hive:8.415 Requirement already satisfied: pip in /home/airflow/.local/lib/python3.12/site-packages (25.0)9.209 ERROR: Could not find a version that satisfies the requirement install (from versions: none)10.1410.14 [notice] A new release of pip is available: 25.0 -> 25.1.110.14 [notice] To update, run: pip install --upgrade pip10.14 ERROR: No matching distribution found for install------Dockerfile:13-------------------- 12 | USER airflow 13 | >>> RUN pip install \ 14 | >>> pip install apache-airflow-providers-apache-hdfs \ 15 | >>> pip install apache-airflow-providers-apache-hive 16 | RUN pip uninstall -y argparse--------------------ERROR: failed to solve: process "/bin/bash -o pipefail -o errexit -o nounset -o nolog -c pip install pip install apache-airflow-providers-apache-hdfs pip install apache-airflow-providers-apache-hive" did not complete successfully: exit code: 1
-
미해결Airflow 마스터 클래스
yaml 파일 수정후 error
강사님 yaml 파일 수정후 서비스 재기동시 다음과 같으 에러가 나네요.혹시 로컬피씨에 보안프로그램이 깔려있는 그것때문일까요? Error response from daemon: invalid config for network ****_network_custom: invalid endpoint settings:
-
미해결Airflow 마스터 클래스
Invalid URL error
BaseOperator 생성이 문제일까요?Invalid URL Error 가 나네요. *** Could not read served logs: Invalid URL 'http://:8793/log/dag_id=dags_seoul_api_corona/run_id=manual__2025-06-13T01:23:17.406645+00:00/task_id=tb_corona19_count_status/attempt=1.log': No host supplied
-
미해결Airflow 마스터 클래스
27. Bash Operators with macros 질문 (START_DATE, END_DATE)
airflow 3.* 를 기준으로 data_interval_start 나 data_interval_end 모두 같은 시간이 나와서 기존 gitHub 코드로 실습하니 기대했던 것과는 다른 log 결과가 반환 되었습니다.이럴 경우 어떻게 코드를 수정해야 하는지 가르쳐주실 수 있을까요?( 혹시 섹션 19에서 다루셨다면 미리 사과드립니다 .. )
-
미해결Airflow 마스터 클래스
python 코드 디버깅 문의
안녕하세요? 강의중 python 으로 dag 작성시 별도의 디버깅을 하지 않는것으로 보입니다.강의를 따라 실제 Dag 작성후 webserver에 반영을하면 여러가지 오류가 가끔 발생되는데, 사전에 디버깅 하는 요령이 있을까요 ?
-
미해결Airflow 마스터 클래스
Airflow 3.* 버전 수강생 Chapter 18 수강
안녕하세요, 좋은 강의 잘 수강하고 있습니다.다름이 아니라 현재 시점으로 airflow 3.* 버전으로 수강 중에 있는데 Chapter 18을 건너뛰고 Chapter 19를 들으면 되는건지 궁금해서 질문 남깁니다. 답변 미리 감사드립니다.
-
미해결Airflow 마스터 클래스
update 부분 강의 질문
선생님 안녕하세요airflow 업데이트에 따라서 강의도 업데이트 해주셔서 정말 감사합니다. 이전에 한번 듣고 다시 복습해서 듣고 있는데, 정말 도움이 많이 되네요 제가 아직 2.10 부분 업데이트를 안들은 상태인데, 3.0 부분 업데이트가 새로 있더라고요. 혹시 2.10 부분 업데이트 강의는 skip하고 3.0 업데이트 부분만 들어도 괜찮을까요?
-
미해결Airflow 마스터 클래스
email operator 에러
안녕하세요.email operator dag을 수행하니 다음과 같이 에러가 납니다. 아래는 제 yaml 파일 설정과 dag 파일입니다. 참고로, google 계정의 보안메뉴에서 앱 비밀번호 설정 메뉴가 조금 바뀌어서 제가 나름대로 search 하여서 앱 번호를 받았습니다. 제 dag입니다. 혹시 airflow.cfg 파일에 들어가보니 SMTP 설정이 되어 있지 않습니다. 관련이 있을까요? 에어플로우 UI 메뉴에서 admin - Connections 에 들어가보았더니 connection이 아무것도 없습니다. 도와주세요!
-
미해결Airflow 마스터 클래스
example_bash_operator 안보임 현상
강사님 airflow 설치 과정 중example_bash_operator 의 dag 가 전혀보이지않아 문의드립니다. 강의대로 따라하고 docker compose up 시, 정상작동을 하는 것같고 다른분들은 example_bash_operator의 dag이 잘보이는거 같은데, 저만 따로 보이지가 않네요..어떻게 해결을 하면 좋을까요?
-
미해결Airflow 마스터 클래스
[Python 오퍼레이터 기본] 10:30 에 나오는 UnPaused 시 동작 이유가 궁금합니다.
질문이 있습니다.[Bash Operator & 외부 쉘파일 수행하기] 강의의 22:20 즈음에 설명해주시는 Unpaused 이후 Dag 의 자동 실행이 어떤 조건에 일어나는 지를 설명해주셨습니다. 그리고 여기서 Next Run 이후의 시간에 Unpause 를 해도, 동작 안하므로 Trigger 를 수동으로 클릭해야 된다고 알려주십니다. 그런데 이후에... [Python 오퍼레이터 기본] 강의의 10:30 즈음에 Unpause 를 누르자 자동으로 실행이 되는 걸 확인할 수 있습니다. 10:21 에는 분명 Next Run 이 2023-03-18, 06:30:00 이라서 분명 과거인데도 자동으로 시작이 되고 있습니다. Next Run 이후의 시간대에서 Unpause 를 하면 자동 실행이 안되서 Trigger 를 한번 해줘야되는 거 아니였나요?여기서는 왜 실행이 된 건가요??
-
해결됨Airflow 마스터 클래스
[외부 파이썬 함수 수행하기] 강의 질문. Trigger 를 시켰는데, Log 조회 불가
안녕하세요 선생님, 제가 선생님과 똑같은 코드로 Task 를 Trigger 를 해봤습니다. 실행도 되고 성공도 한 거 같기는 한데, 이상하게 GRID 창에서 Task 로그를 위해 클릭을 하려고 하면 저 빨간색 박스 부분이 비어있습니다. 그래서 로그를 못보고 있습니다.혹시나 몰라 Task Graph 도 첨부합니다.그리고 Airflow 버전은 2.10.5 를 사용중입니다.