Communitygithub.com

Airflow DAG 오케스트레이터

Apache Airflow DAG를 설계하고 운영하여 의존성 관리, SLA, 모니터링을 갖춘 안정적인 데이터 파이프라인 오케스트레이션을 구현합니다.

Airflow DAG 오케스트레이터란 무엇인가요?

이 스킬은 Apache Airflow DAG를 설계, 구현 및 운영하기 위한 종합 가이드를 제공합니다. 개발자는 TaskFlow API를 사용하여 Python 네이티브 DAG를 정의하고, 스케줄링(cron 또는 timetable), 재시도 정책, SLA 설정 방법을 배울 수 있습니다. 또한 동적 태스크 매핑을 통한 팬아웃/팬인 패턴, dbt와의 통합(cosmos 또는 BashOperator) 등 고급 아키텍처 패턴을 지원합니다. 지원되는 플랫폼은 Apache Airflow 2.10+, AWS MWAA, Google Cloud Composer 3이며, 주요 제공자는 Snowflake, Google, AWS, dbt-cloud를 포함합니다. 이 스킬은 대규모 데이터를 XCom으로 전달하지 않고 참조(S3 경로)만 전달하는 모범 사례와, Fat 태스크 방지, catchup=True 실수 방지 등 일반적인 안티패턴을 피하는 방법을 강조합니다. 또한 로컬 테스트(`airflow dags test`)와 품질 체크리스트를 통해 배포 전 안정성을 확보할 수 있도록 돕습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/curiositech/windags-skills/tree/HEAD/skills/airflow-dag-orchestrator

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Airflow DAG 오케스트레이터은(는) 무엇을 하나요?

Apache Airflow DAG를 설계하고 운영하여 적절한 의존성 관리, SLA, 모니터링을 갖춘 안정적인 데이터 파이프라인 오케스트레이션을 구현합니다.

활성화 트리거

다음에서 활성화: "Airflow", "DAG", "operator", "sensor", "scheduler", "task dependency", "SLA", "backfill", "XCom", "TaskFlow API", "MWAA", "Cloud Composer"

다음에는 사용하지 않음: dbt 모델 실행 → dbt-analytics-engineer (Airflow가 dbt를 트리거할 수는 있음) | 스트림 처리 → streaming-pipeline-architect | 워크플로 엔진(Temporal) → distributed-transaction-manager

빠른 시작

  1. DAG 정의 — TaskFlow API(@dag, @task 데코레이터)를 사용하여 Python 네이티브 DAG 작성
  2. 스케줄 설정 — cron 또는 timetable, catchup=False (백필 의도가 없는 경우)
  3. 재시도 구성 — 모든 태스크에 retries=2, retry_delay=timedelta(minutes=5) 설정
  4. SLA 추가 — 중요 경로 태스크에 sla=timedelta(hours=2) 설정
  5. 로컬 테스트 — 배포 전 airflow dags test my_dag 2026-01-01 실행

핵심 기능

도메인기술
AirflowApache Airflow 2.10+, MWAA, Cloud Composer 3
오퍼레이터BashOperator, PythonOperator, KubernetesPodOperator
프로바이더apache-airflow-providers-{snowflake, google, aws, dbt-cloud}
실행기CeleryExecutor, KubernetesExecutor, LocalExecutor
모니터링SLA 미달, 태스크 지속 시간, Airflow 메트릭 → Prometheus

아키텍처 패턴

TaskFlow API DAG

from airflow.decorators import dag, task
from datetime import datetime, timedelta

@dag(
    schedule="0 6 * * *",          # 매일 06:00 UTC
    start_date=datetime(2026, 1, 1),
    catchup=False,
    default_args={
        "retries": 2,
        "retry_delay": timedelta(minutes=5),
        "sla": timedelta(hours=2),
    },
    tags=["finance", "daily"],
)
def daily_revenue_pipeline():

    @task()
    def extract_payments() -> dict:
        """Stripe API에서 추출"""
        data = stripe_client.list_payments(date=today())
        return {"count": len(data), "path": "s3://raw/payments/"}

    @task()
    def extract_orders() -> dict:
        """Shopify API에서 추출"""
        data = shopify_client.list_orders(date=today())
        return {"count": len(data), "path": "s3://raw/orders/"}

    @task()
    def transform(payments: dict, orders: dict) -> str:
        """DuckDB에서 조인 및 변환"""
        result_path = run_duckdb_transform(payments["path"], orders["path"])
        return result_path

    @task()
    def load(path: str):
        """Snowflake에 로드"""
        snowflake_copy_into("fct_revenue", path)

    # 함수 호출을 통해 의존성 정의
    payments = extract_payments()
    orders = extract_orders()
    transformed = transform(payments, orders)
    load(transformed)

daily_revenue_pipeline()

동적 태스크 매핑 (팬아웃/팬인)

@task()
def get_partitions() -> list[str]:
    return ["2026-01-01", "2026-01-02", "2026-01-03"]

@task()
def process_partition(partition_date: str) -> dict:
    """각 파티션에 대해 병렬 실행"""
    return {"date": partition_date, "rows": process(partition_date)}

@task()
def aggregate(results: list[dict]):
    """팬인: 모든 파티션 결과 수신"""
    total = sum(r["rows"] for r in results)
    log.info(f"총 {total} 행 처리됨")

# process_partition을 모든 파티션에 동적으로 매핑
partitions = get_partitions()
results = process_partition.expand(partition_date=partitions)
aggregate(results)

dbt + Airflow 통합

from airflow.operators.bash import BashOperator
from cosmos import DbtDag, ProjectConfig, ProfileConfig

# 옵션 1: cosmos (권장)
dbt_dag = DbtDag(
    project_config=ProjectConfig("/opt/airflow/dbt/"),
    profile_config=ProfileConfig(
        profile_name="default",
        target_name="prod",
    ),
    schedule="@daily",
    dag_id="dbt_daily",
)

# 옵션 2: BashOperator (간단)
dbt_run = BashOperator(
    task_id="dbt_run",
    bash_command="cd /opt/airflow/dbt && dbt build --select tag:daily",
)

안티패턴

  1. Fat 태스크 — 태스크는 원자적인 단위여야 함; 하나의 태스크에 추출+변환+로드를 넣지 말 것
  2. 대용량 데이터에 XCom 사용 — XCom은 메타데이터(경로, 개수)용; 데이터는 S3/GCS를 통해 전달하고 XCom 피클은 사용 금지
  3. 실수로 catchup=True 설정 — 백필이 필요하지 않으면 catchup=False로 설정; 그렇지 않으면 Airflow가 모든 누락된 간격을 실행함
  4. 재시도 없음 — 일시적 실패는 흔함; 항상 지연 시간과 함께 retries >= 1 설정
  5. DAG 파일의 최상위 레벨 코드 — DAG 파일은 30초마다 파싱됨; 모듈 레벨에서 무거운 import나 API 호출은 스케줄러를 느리게 만듦

품질 체크리스트

  • Python 네이티브 DAG에 TaskFlow API 사용 (레거시 연산자 체이닝 대신)
  • 백필 의도가 없으면 catchup=False 설정
  • 모든 태스크에 재시도 구성 (최소 1회 재시도)
  • 중요 경로 태스크에 SLA 설정
  • XCom이 데이터 페이로드 대신 참조(S3 경로)를 전달
  • 팬아웃 병렬 처리를 위해 동적 태스크 매핑 사용
  • 배포 전 airflow dags test로 DAG 로컬 테스트 완료
  • 태스크 멱등성: 태스크 재실행 시 동일한 결과 생성
  • 태스크 실패 및 SLA 미달에 대한 알림 구성
  • Airflow UI에서 필터링을 위해 DAG 태그 적용

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

curiositech/windags-skills

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

curiositech/windags-skills

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

curiositech/windags-skills

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

curiositech/windags-skills

Implement WCAG 2.2 AA/AAA compliance with automated testing, keyboard navigation, screen reader support, and focus management. Activate on: accessibility audit, WCAG compliance, keyboard navigation, screen reader, aria attributes, axe-core, focus trap. NOT for: design-level accessibility review (use design-accessibility-auditor), color contrast only (use css-in-js-architect).

curiositech/windags-skills

Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time estimation, dopamine-aware task design, and building systems that actually work for neurodivergent minds.

curiositech/windags-skills

Designs digital experiences for ADHD brains using neuroscience research and UX principles. Expert in reducing cognitive load, time blindness solutions, dopamine-driven engagement, and compassionate design patterns. Activate on 'ADHD design', 'cognitive load', 'accessibility', 'neurodivergent UX', 'time blindness', 'dopamine-driven', 'executive function'. NOT for general accessibility (WCAG only), neurotypical UX design, or simple UI styling without ADHD context.

curiositech/windags-skills

>- Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

curiositech/windags-skills

Extend and modify the admin dashboard, developer portal, and operations console. Use when adding new admin tabs, metrics, monitoring features, or internal tools. Activates for dashboard development, analytics, user management, and internal tooling.

curiositech/windags-skills

Conversation patterns and interaction protocols for multi-agent systems. Covers request/response, pub/sub, blackboard, delegation chains, debate, critique, consensus, fan-out/fan-in, supervisor-worker, and peer negotiation. Deep analysis of AutoGen conversation patterns, CrewAI delegation, LangGraph state passing, and FIPA-ACL performatives. Teaches how to design what agents say to each other and in what order. Activate on: "agent conversation", "agent protocol", "multi-agent debate", "agent delegation", "supervisor worker pattern", "agent voting", "consensus protocol", "fan-out fan-in", "agent negotiation", "blackboard pattern", "agent dialogue", "conversation topology", "agent handoff". NOT for: wire format or serialization (use agent-interchange-formats), orchestration infrastructure (use agentic-infrastructure-2026), single agent behavior (use agentic-patterns).

curiositech/windags-skills

Meta-agent for creating new custom agents, skills, and MCP integrations. Expert in agent design, MCP development, skill architecture, and rapid prototyping. Activate on 'create agent', 'new skill', 'MCP server', 'custom tool', 'agent design'. NOT for using existing agents (invoke them directly), general coding (use language-specific skills), or infrastructure setup (use deployment-engineer).

curiositech/windags-skills

AI-powered calendar management and agent-based scheduling coordination. Covers calendar APIs (Google Calendar, CalDAV/iCal), AI scheduling assistants (Reclaim, Clockwise, Motion, Cal.com), building custom calendar agents with MCP, multi-calendar merging, timezone management, focus block protection, meeting fatigue detection, and agent-to-agent meeting negotiation protocols. Activate on: "calendar agent", "AI scheduling", "calendar coordination", "meeting scheduling", "calendar API", "focus time protection", "calendar optimization", "Google Calendar MCP", "Reclaim", "Clockwise", "Motion", "Cal.com", "smart scheduling", "calendar-aware agent", "timezone scheduling", "agent negotiation meetings". NOT for: manual calendar UI component design (use form-validation-architect), project management scheduling or Gantt charts (use project-management-guru-adhd), general time-tracking or pomodoro apps (use adhd-daily-planner for time-awareness), building the agent itself from scratch (use agent-creator).

curiositech/windags-skills

Build and adopt production AI agent infrastructure in 2026. Covers framework selection (LangGraph, CrewAI, AutoGen, MCP), orchestration patterns, evaluation, observability, memory systems, and tool use. Also covers the SOCIAL dimension: how to sell agent infrastructure internally, change management, measuring ROI, building trust in autonomous systems, and scaling adoption across teams. Activate on: "agent infrastructure", "agent framework comparison", "which agent framework", "sell AI tools internally", "agent adoption", "agent observability", "agent evaluation", "MCP architecture", "agentic mesh", "enterprise AI agents", "AI change management", "agent ROI". NOT for: building specific agents (use ai-engineer), designing agent behavior patterns (use agentic-patterns), prompt tuning (use prompt-engineer).

curiositech/windags-skills

Fundamental patterns for effective agentic behavior. Teaches decomposition, tool orchestration, error recovery, context management, quality self-assessment, and knowing when to stop. Model-agnostic principles that make any agent more effective regardless of domain. Activate on: "how should I structure this agent", "agentic workflow", "agent patterns", "multi-step task", "tool orchestration", "/agentic-patterns", "decompose this", "agent best practices", "chain of actions", "when should the agent stop", "agent loop design". NOT for: creating agent infrastructure (use agent-creator), building DAGs (use windags-architect), specific tool implementation.

curiositech/windags-skills

Automated discovery and matching of agent skills for dynamic task routing and capability assessment

curiositech/windags-skills

Cryptographic security for agentic systems — zero-trust agent networking, signed message envelopes (JWS/JWE), capability-based security (ocaps), Merkle tree audit trails, WASM sandboxing, and formal verification. Covers CLI dev tool security, mTLS between agents, permission boundaries (least privilege for AI agents), and supply chain security for skills/plugins. Activate on: "agent security", "zero trust agents", "secure agent communication", "capability-based security", "ocap", "signed messages between agents", "agent audit trail", "sandbox agent execution", "agent permissions", "mTLS agents", "cryptographic verification", "agent supply chain", "OWASP agentic", "prove agent did X", "tamper-proof agent logs". NOT for: application-level SAST scanning (use security-auditor), network firewall rules (use infrastructure), SOC2/HIPAA compliance (organizational), or prompt injection defense (use prompt-engineer).

curiositech/windags-skills

Data structures and serialization formats for agent-to-agent communication. Covers message envelopes, structured output schemas, capability declarations, task handoff payloads, error/retry signaling, and context windows as data structures. Deep comparison of A2A protocol, MCP, OpenAI function calling, and LangChain message types. Teaches when to use rigid schemas vs free-form with validation, typed vs untyped, streaming vs batch. Activate on: "agent message format", "agent communication schema", "agent-to-agent protocol", "A2A protocol", "MCP message format", "structured output for agents", "agent interop", "interchange format", "agent serialization", "task handoff format", "capability declaration". NOT for: what agents say to each other (use agent-conversation-protocols), orchestration topology (use multi-agent-coordination), building agent infrastructure (use agentic-infrastructure-2026).

curiositech/windags-skills

Logic-based agent programming language implementing BDI architecture for practical autonomous agent development

curiositech/windags-skills

>- Design AgentSpeak(L)-style BDI agents with context-guarded plans, selection functions, and intention stacks. Use for interruptible autonomy, agent policy, and multi-agent orchestration in dynamic environments. NOT for simple rule engines, static planners, or centralized workflows.

curiositech/windags-skills

Foundational concurrent computation model where actors communicate exclusively through asynchronous message passing

curiositech/windags-skills

license: Apache-2.0 NOT for unrelated tasks outside this domain.

관련 스킬