# Template: Load with Upsert
# Insert new records, update existing ones based on primary key
# Copy to your pipeline directory as load.yaml

title: load_upsert
description: Upsert (insert or update) into database
version: "1.0.0"

# Target type (required)
type: postgres

table: my_table
schema: public
write_method: upsert
primary_key: id  # or ["col1", "col2"] for composite key
batch_size: 1000

database:
  url: ${DATABASE_URL:?DATABASE_URL is required}

# Optional: specify which columns to update on conflict
# update_columns:
#   - name
#   - updated_at
#   - status
