# Template: Pipeline Settings
# Copy to your pipeline directory as settings.yaml
#
# This file provides shared configuration for the pipeline:
# - Dead Letter Queue (DLQ) settings for quarantining invalid records
# - Metadata store connection for database-backed contracts
# - Default contract name for load validation
#
# Usage:
#   pipeline = Pipeline.from_config_dir("path/to/pipeline")
#   result = await pipeline.run()

name: pipeline_settings
description: Shared pipeline configuration
version: "1.0.0"

# ============================================================================
# Dead Letter Queue (DLQ) Configuration
# ============================================================================
# Records that fail validation can be sent to a DLQ for later review.
# Configure this at the settings level to share across extract and load stages.

dlq:
  # Enable/disable DLQ
  enabled: true
  
  # Storage backend: "file", "database", or "memory"
  backend: file
  
  # File backend options
  path: ./dlq  # Directory to store quarantined records
  
  # Database backend options (uncomment to use)
  # backend: database
  # connection_string: ${DATABASE_URL}
  # schema: pycharter  # Database schema for DLQ table
  # table: dead_letter_queue  # Optional custom table name

# ============================================================================
# Metadata Store Configuration (Optional)
# ============================================================================
# If you store contracts in a database (using MetadataStoreClient), configure
# the connection here. This allows load validation to reference contracts by name.

# metadata_store:
#   type: postgres  # or sqlite, mongodb, redis, memory
#   connection_string: ${DATABASE_URL}

# ============================================================================
# Default Contract (Optional)
# ============================================================================
# Specify a default contract name for load validation when using `use_contract: true`
# in your load config. The contract must exist in the metadata_store.

# contract: orders_v2
