version: 1

load:
  name: nexuscrm
  engine: databend
  secrets_file: secrets.env

cloud_lake:
  # Where to write, and the target database names this load owns.
  dsn_env: DATABEND_DSN
  databases:
    # Load provisions only the raw layer. Staging and above are transform-layer
    # concerns owned by the transformation tool, not the load (ADR 0016).
    raw: nexuscrm_raw

s3:
  # How to read the S3 bulk extract. The loader is source-agnostic, so these are
  # plain "S3 read credentials" — values stay in the ignored secrets.env; only the
  # env var names are tracked. They may hold the same key the producer used to
  # write the bucket (e.g. a TiDB Cloud export), but that is not assumed here.
  region: us-west-2
  credentials:
    access_key_id_env: NEXUSCRM_S3_ACCESS_KEY_ID
    secret_access_key_env: NEXUSCRM_S3_SECRET_ACCESS_KEY

setup:
  databend:
    files:
      - ingestion/load/s3_bulk_load/setup/databend/nexuscrm/001_databases.sql

# This load owns the raw-snapshot product contract it materializes (generated under
# contracts/generated/ via `generate-contracts`), inheriting schema, keys, and
# classifications from the upstream S3 snapshot *source* contract the extract stage
# produces. The load stage materializes only the raw layer; staging and above are
# transform-layer concerns (dbt/airflow). The run manifest remains the physical
# column-schema handoff.
source_contracts:
  - ref: ingestion/extract/tidbcloud/sources/nexuscrm/contracts/generated/*.s3-snapshot.source.contract.yaml
