Principle:PrefectHQ Prefect Asset Definition
| Metadata | |
|---|---|
| Source | Repo: Prefect |
| Source | Doc: Prefect Assets |
| Domains | Data_Engineering, Orchestration |
| Last Updated | 2026-02-09 00:00 GMT |
Overview
A declarative pattern for defining named data products with unique identifiers that enable dependency tracking and lineage across pipeline stages.
Description
Asset Definition introduces named, trackable data products into Prefect pipelines. An Asset represents a unit of data (a table, file, model, or dataset) identified by a unique key using URI format (e.g., pipeline://raw_data, s3://bucket/path). Assets enable:
- Declarative dependency tracking -- Prefect infers which assets depend on which
- Lineage visualization in the UI
- Caching -- skip re-computation if upstream assets haven't changed
- Versioning of data products
Usage
Use Asset Definition when building data pipelines where you want Prefect to track data products, their dependencies, and lineage. This is the foundation for the @materialize decorator pattern.
Theoretical Basis
Asset-based pipelines follow the data-centric orchestration model (as opposed to task-centric). Instead of defining execution order explicitly, you declare what data products exist and how they depend on each other. The system infers execution order from the dependency graph. This is conceptually similar to dbt's model-based approach or Dagster's Software-Defined Assets.