Community연구 & 데이터 분석github.com

Unknown-333/데이터 수집 파이프라인 구축

전체 대 증분 추출, 변경 데이터 캡처(CDC), 워터마크 및 하이워터마크, API 페이지네이션 및 속도 제한, 관리형 EL 도구(Fivetran, Airbyte) 대 사용자 정의 코드 선택 등 배치 및 증분 데이터 수집(추출-로드) 파이프라인을 구축합니다. 데이터베이스, API, 파일 또는 SaaS에서 웨어하우스/레이크로 데이터를 수집하거나 증분 추출 및 CDC를 설계할 때 사용하세요.

데이터 수집 파이프라인 구축란 무엇인가요?

이 스킬은 데이터 엔지니어와 AI 에이전트 사용자가 전체 스냅샷, 증분 추출, 변경 데이터 캡처(CDC) 등 다양한 추출 모드를 다루는 강력한 데이터 수집(EL) 파이프라인을 구축하는 방법을 안내합니다. 핵심 개념으로는 신뢰할 수 있는 하이워터마크 선택(updated_at, LSN/binlog 등), 원시 데이터의 불변 적재(브론즈 레이어), 멱등적 로드(upsert/파티션 덮어쓰기), API 페이지네이션 및 속도 제한 처리, 지연 데이터 처리가 포함됩니다. 또한 Fivetran/Airbyte와 같은 관리형 EL 도구와 사용자 정의 코드 접근 방식의 장단점을 비교하여 다양한 요구 사항에 적합한 선택을 돕습니다. 특히 `updated_at` 워터마크의 신뢰성 문제, 중복 윈도우 누락으로 인한 지연 업데이트 손실, 추출 중 변환 수행으로 인한 재현 불가능 등의 일반적인 함정을 강조하며, 이 스킬은 데이터 웨어하우스/레이크로의 데이터 수집을 최적화하는 데 필수적입니다.

지원 대상~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/Unknown-333/awesome-data-engineering-skills/tree/main/skills/building-ingestion-pipelines

Installed? Explore more 연구 & 데이터 분석 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

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

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

문서

수집 파이프라인 구축

사용 시기

  • 데이터베이스, API, 파일 또는 SaaS에서 웨어하우스/레이크로 추출할 때
  • 증분 추출, 워터마크 또는 CDC를 설계할 때
  • API 페이지네이션, 속도 제한 및 재시도를 처리할 때
  • 관리형 EL(Fivetran/Airbyte)과 사용자 정의 코드 중 결정할 때
  • 이미 적재된 데이터를 변환하는 데는 사용하지 마십시오(dbt/Spark 스킬 사용).

워크플로우

- [ ] 추출 모드 결정: 전체 스냅샷 vs 증분 vs CDC
- [ ] 신뢰할 수 있는 하이워터마크 선택(updated_at, LSN/binlog, 시퀀스)
- [ ] 원시 데이터를 불변적으로 적재(추가), 이후 다운스트림에서 변환
- [ ] 로드를 멱등적으로 만듦(upsert/키별 파티션 덮어쓰기)
- [ ] 페이지네이션, 속도 제한, 재시도 및 지연 데이터 처리
  1. 모드를 선택하세요. 전체 재로드(소형/차원 테이블), 하이워터마크 기반 증분(대부분의 팩트 테이블), 또는 CDC(삭제와 모든 변경이 필요한 대용량 OLTP) 중 선택합니다.
  2. 신뢰할 수 있는 워터마크를 선택하세요. updated_at은 소스가 항상 업데이트할 때만 작동합니다. 그렇지 않으면 DB 로그 위치(LSN/binlog/SCN) 또는 단조 시퀀스를 사용하세요. 마지막 워터마크를 저장하고 그 지점부터 재개합니다.
  3. 원시 데이터를 불변적으로 적재하세요. 원시 추출물을 로드 메타데이터와 함께 추가(브론즈 레이어)합니다. 변환은 다운스트림에서 수행하여 소스를 다시 가져오지 않고도 재생할 수 있게 합니다.
  4. 멱등적 로드. 자연 키로 upsert하거나 파티션을 덮어써서 재시도와 중복이 중복을 발생시키지 않도록 합니다(writing-idempotent-transformations 참조).
  5. 견고하게 만드세요. 페이지네이션, 속도 제한 및 지연 데이터에 대비합니다.

패턴

지연 데이터를 위한 중복 윈도우를 포함한 증분 추출:

-- 마지막 워터마크 이후 작은 중복 윈도우를 가져와 지연 업데이트를 포착하고,
-- 키로 upsert하여 중복이 생기지 않도록 합니다.
SELECT * FROM source.orders
WHERE updated_at >= :last_watermark - INTERVAL '3 days';

CDC — 데이터베이스 로그(Debezium/네이티브)를 읽어 삽입, 업데이트 및 삭제(워터마크 기반 추출이 놓치는 부분)를 포착합니다. 변경의 커밋 위치를 순서 기준으로 사용하여 MERGE로 변경 사항을 적용합니다.

API 페이지네이션 + 속도 제한 — 커서/다음 페이지 토큰을 따르고, 429/5xx 오류 시 지수 백오프와 지터를 사용하여 백오프 및 재시도하며, 진행 상황을 체크포인트하여 실패 시 중간부터 재개합니다.

관리형 대 사용자 정의 — 표준 커넥터에는 Fivetran/Airbyte를 사용합니다(스키마 변경, 증분 상태, 재시도를 처리합니다). 비표준 소스 또는 엄격한 제어/비용 요구 사항이 있을 때만 사용자 정의 코드를 작성합니다.

일반적인 함정

  • 소스가 안정적으로 설정하지 않는 updated_at 워터마크 — 조용히 행을 누락합니다. 검증하거나 로그 기반 CDC로 전환하세요.
  • 중복 윈도우 없음 — 실행 사이에 지연 도착 업데이트가 손실됩니다.
  • 삭제를 기대하는 워터마크 기반 추출 — 삭제를 볼 수 없습니다. CDC 또는 주기적인 전체 조정을 사용하세요.
  • 추출 중 변환 수행 — 재생이 불가능합니다. 먼저 원시 데이터를 적재하세요.
  • 속도 제한/페이지네이션 경계 사례 무시 — 완료된 것처럼 보이는 부분 추출이 발생합니다. 체크포인트를 만들고 카운트를 검증하세요.
  • 비멱등적 로드 — 재시도와 중복 윈도우가 행을 중복시킵니다.

Individual skills in this repo

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

Unknown-333/authoring-airflow-dags

Write production-grade Apache Airflow DAGs using the TaskFlow API — idempotent tasks, correct scheduling and catchup, retries/SLAs, connections/variables, and avoiding top-level code. Use when creating or reviewing Airflow DAGs, scheduling pipelines, wiring task dependencies, configuring retries/backfills, or fixing non-idempotent tasks.

Unknown-333/building-dagster-assets

Build Dagster pipelines using software-defined assets — asset dependencies, partitions, resources and IO managers, asset checks, and schedules/sensors. Use when creating Dagster assets or jobs, modeling data as assets, adding partitions or backfills, wiring resources/IO managers, or migrating from task-based orchestration to assets.

Unknown-333/building-dbt-models

Build well-structured dbt models — staging/intermediate/marts layers, ref() and source(), materializations, and incremental models with the right strategy. Use when creating or refactoring dbt models, choosing table vs view vs incremental, structuring a dbt project, or writing incremental logic.

Unknown-333/building-feature-pipelines

Build ML feature pipelines and feature stores — point-in-time-correct joins to avoid label leakage, offline/online parity, feature freshness and backfills, and materialization with tools like Feast. Use when engineering features for ML, preventing train/serve skew or data leakage, building a feature store, or backfilling historical features for training.

Unknown-333/building-iceberg-tables

Design and operate Apache Iceberg tables — partitioning and hidden partitioning, partition/schema evolution, snapshots and time travel, compaction and small-file cleanup, and MERGE/upsert for lakehouse tables on Spark, Flink, Trino, or Snowflake. Use when creating or maintaining Iceberg tables, choosing partitioning, evolving schema/partitions, or fixing small-file and metadata bloat.

Unknown-333/building-kafka-consumers

Build reliable Apache Kafka consumers and producers — consumer groups and partition assignment, offset commit strategy, at-least-once vs exactly-once, idempotent/transactional producers, rebalancing, and dead-letter handling. Use when writing Kafka consumers/producers, configuring offset commits or consumer groups, tuning throughput, or handling rebalances and poison messages.

Unknown-333/debugging-data-pipelines

Systematically root-cause data pipeline failures and data incidents — job errors, wrong or missing data, duplicates, and freshness misses — by tracing lineage upstream, isolating the failing stage, reconciling against source, and planning a safe fix and backfill. Use when a pipeline fails, numbers look wrong, data is missing or duplicated, a dashboard is stale, or a stakeholder reports a data discrepancy.

Unknown-333/designing-backfills-and-replays

Plan and run safe data backfills and replays — idempotent reprocessing of historical windows, partition-by-partition execution, isolating backfill compute from production, verifying results, and avoiding double-counting or changed history. Use when backfilling a new or fixed model, reprocessing after a bug, replaying events, or loading history for a new pipeline without corrupting existing data.

Unknown-333/designing-data-contracts

Define and enforce data contracts between producers and consumers — explicit schema, semantics, ownership, SLAs, and versioning — to prevent silent upstream changes from breaking downstream pipelines. Use when a producer schema change could break consumers, defining an interface between teams/services and the warehouse, or adding schema enforcement at ingestion.

관련 스킬