跳到正文
Skillpedia
数据库18k · #10673

data-pipeline

它能做什么

这个技能指导使用 Airflow、Spark 和 dbt 等工具构建 ETL 和 ELT 数据管道,并包含质量检查和重试。适合按计划移动和转换数据的数据工程师。

适用场景

  • ✓当你需要一条定时管道,把数据从来源搬运到数据仓库时。
  • ✓当管道必须可以安全地重新运行,而不产生重复数据时。
  • ✓当你希望在管道各阶段之间进行数据质量检查时。

技能链接

https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/data-pipeline/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/data-pipeline/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请设计一条 Airflow 管道,把每日订单文件加载到我们的数据仓库,并在报表运行之前检查是否有缺失的行。”

每周 5 个新技能,1 分钟读完。

工作原理

该技能设定一些原则,例如可重复的步骤、分区数据以及阶段之间的质量检查,并给出 DAG、Spark 作业和 dbt 模型的示例。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Data Pipeline Expert

A data engineering specialist with extensive experience designing and operating production ETL/ELT pipelines, orchestration frameworks, and data quality systems. This skill provides guidance for building reliable, observable, and scalable data pipelines using industry-standard tools like Apache Airflow, Spark, and dbt across batch and streaming architectures.

Key Principles

  • Prefer ELT over ETL when your target warehouse can handle transformations; load raw data first, then transform in place for reproducibility and auditability
  • Design every pipeline step to be idempotent; re-running a task with the same inputs must produce the same outputs without side effects or duplicates
  • Partition data by time or logical keys at every stage; partitioning enables incremental processing, efficient pruning, and manageable backfill operations
  • Instrument pipelines with data quality checks between stages; catching bad data early prevents cascading corruption through downstream tables
  • Separate orchestration (when and what order) from computation (how); the scheduler should not perform heavy data processing itself

Techniques

  • Build Airflow DAGs with task-level retries, timeouts, and SLAs; use sensors for external dependencies and XCom for lightweight inter-task communication
  • Design Spark jobs with proper partitioning (repartition/coalesce), broadcast joins for small dimension tables, and caching for reused DataFrames
  • Structure dbt projects with staging models (source cleaning), intermediate models (business logic), and mart models (final consumption tables)
  • Write dbt tests at multiple levels: schema tests (not_null, unique, accepted_values), relationship tests, and custom data tests for business rules
  • Implement data quality gates using frameworks like Great Expectations: define expectations on row counts, column distributions, and referential integrity
  • Use Change Data Capture (CDC) patterns with tools like Debezium to stream database changes into event pipelines without polling

Common Patterns

  • Incremental Load: Process only new or changed records using high-watermark columns (updated_at) or CDC events, falling back to full reload on schema changes
  • Backfill Strategy: Design DAGs with date-parameterized runs so historical reprocessing uses the same code path as daily runs, just with different date ranges
  • Dead Letter Queue: Route failed records to a separate table or topic for investigation and reprocessing instead of halting the entire pipeline
  • Schema Evolution: Use schema registries (Avro, Protobuf) or column-add-only policies to evolve data contracts without breaking downstream consumers

Pitfalls to Avoid

  • Do not perform heavy computation inside Airflow operators; delegate to Spark, dbt, or external compute and use Airflow only for orchestration
  • Do not skip data validation after ingestion; silent schema changes from upstream sources are the most common cause of pipeline failures
  • Do not hardcode connection strings or credentials in pipeline code; use secrets managers and environment-based configuration
  • Do not run full table scans on every pipeline execution when incremental processing is feasible; it wastes compute and increases latency
常见问题

什么是幂等?

它指用同样的输入重新运行某一步,得到的结果相同,不会产生重复数据或副作用。

ETL 还是 ELT?

当数据仓库能够进行转换时,该技能更推荐 ELT,即先加载原始数据,再在仓库中转换。

为什么要分区?

分区让管道只处理新数据,也使补录历史数据更容易管理。

详情

作者的原始描述

Data pipeline expert for ETL, Apache Spark, Airflow, dbt, and data quality

repo: RightNow-AI/openfang

热度

GitHub 星标
18k
排名
#10673
许可证
Apache-2.0
更新时间
2026/7/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能