load_seeds
Load CSV seed files into database tables to provide reference data for models and tests. Use state-based selection to only load changed seeds.
Instructions
Load seed data (CSV files) from seeds/ directory into database tables.
When to use: Run this before building models or tests that depend on reference data. Seeds must be loaded before models that reference them can execute.
What are seeds: CSV files containing static reference data (country codes, product categories, lookup tables, etc.). Unlike models (which are .sql files), seeds are CSV files that are loaded directly into database tables.
State-based selection modes (detects changed CSV files):
select_state_modified: Load only seeds modified since last successful run (state:modified)
select_state_modified_plus_downstream: Load modified + downstream dependencies (state:modified+) Note: Requires select_state_modified=True
Manual selection (alternative to state-based):
select: dbt selector syntax (e.g., "raw_customers", "tag:lookup")
exclude: Exclude specific seeds
Important: Change detection for seeds works via file hash comparison:
Seeds < 1 MiB: Content hash is compared (recommended)
Seeds >= 1 MiB: Only file path changes are detected (content changes ignored) For large seeds, use manual selection or run all seeds.
Args: select: Manual selector for seeds exclude: Exclude selector select_state_modified: Use state:modified selector (changed seeds only) select_state_modified_plus_downstream: Extend to state:modified+ (changed + downstream) full_refresh: Truncate and reload seed tables (default behavior) show: Show preview of loaded data state: Shared state object injected by FastMCP
Returns: Seed results with status and loaded seed info
See also: - run_models(): Execute .sql model files (not CSV seeds) - build_models(): Runs both seeds and models together in DAG order - test_models(): Run tests (requires seeds to be loaded first if tests reference them)
Examples: # Before running tests that depend on reference data load_seeds() test_models(select="test_customer_country_code")
# After adding a new CSV lookup table
load_seeds(select="new_product_categories")
# Fix "relation does not exist" errors from models referencing seeds
load_seeds() # Load missing seed tables first
run_models(select="stg_orders")
# Incremental workflow: only reload what changed
load_seeds(select_state_modified=True)
# Full refresh of a specific seed
load_seeds(select="country_codes", full_refresh=True)Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| select | No | ||
| exclude | No | ||
| select_state_modified | No | ||
| select_state_modified_plus_downstream | No | ||
| full_refresh | No | ||
| show | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||