# Template: Load with Dead Letter Queue
# Copy to your pipeline directory as load.yaml
# Failed records are written to a DLQ table/file for later processing

title: load_with_dlq
description: Load with dead letter queue for failed records
version: "1.0.0"

# Target type (required)
type: postgres

table: my_table
schema: public
write_method: upsert
primary_key: id
batch_size: 1000

database:
  url: ${DATABASE_URL}

# Dead Letter Queue configuration
# Note: Use 'dead_letter_queue' as the key (not 'dlq')
dead_letter_queue:
  enabled: true

  # DLQ backend type: "database", "file", or "memory"
  backend: database

  # Schema for DLQ table (optional, defaults to 'public')
  schema_name: public

  # For file-based DLQ, specify storage_path:
  # backend: file
  # storage_path: ./dlq/my_table_failures.jsonl
