Skip to content

Assets

Assets represent data objects like datasets, models, and schemas that flow through your app.

Overview

Assets are the primary way to pass structured data between steps in your workflow. They provide:

  • Type Safety: Strongly-typed data structures
  • Persistence: Automatic storage and retrieval
  • Validation: Built-in schema validation
  • Serialization: Efficient storage in S3 or PostgreSQL

Available Asset Types

  • Dataset: Tabular data (pandas DataFrames)
  • Model: Trained ML models
  • Schema: Data schemas and validation rules

Usage Pattern

# In Step 1 - Create and store asset
def run(self, flow_metadata):
    df = load_data()

    dataset = Dataset(
        name="Sales Data",
        data=df
    )

    # Store in output link
    self._outLink.dataset = dataset

# In Step 2 - Retrieve and use asset
def run(self, flow_metadata):
    # Retrieve from input link
    dataset = self._inLink.dataset

    # Access the data
    df = dataset.data

    # Process it
    processed = process_data(df)

See Also