# Brink mapping for `curated.pos_destinations`

## Main staging sources used today

- `staging.brink_settings2_get_destinations`

## Mapping groups

- Business property mappings describe how Brink destination content is mapped into curated business fields.
- Technical and ETL property mappings describe lineage, source reconciliation, tenant scoping, and ingestion metadata.

## Business property mappings

| Curated Column | Brink Staging Table | Brink Property Path | Current mapping | Status | Notes |
|---|---|---|---|---|---|
| `destination_id` | `staging.brink_settings2_get_destinations` | `destination_id` | `dest.destination_id` | `Mapped` | Direct Brink destination ID. |
| `name` | `staging.brink_settings2_get_destinations` | `name` | `dest.name` | `Mapped` | Direct destination name. Also used as `order_type` in `curated.pos_orders`. |
| `indicator` | `staging.brink_settings2_get_destinations` | `indicator` | `dest.indicator` | `Mapped` | Direct indicator code. |
| `description` | `staging.brink_settings2_get_destinations` | `description` | `dest.description` | `Mapped` | Direct description. |
| `is_active` | `staging.brink_settings2_get_destinations` | `is_active` | `dest.is_active` | `Mapped` | Direct active flag. |
| `is_delivery` | `staging.brink_settings2_get_destinations` | `is_delivery` | `dest.is_delivery` | `Mapped` | Direct delivery flag. Also used to derive `service_channel` and `fulfillment_channel` in `curated.pos_orders`. |
| `delivery_minutes` | `staging.brink_settings2_get_destinations` | `delivery_minutes` | `dest.delivery_minutes` | `Mapped` | Direct delivery time in minutes. |
| `snapshot_date` | `staging.brink_settings2_get_destinations` | `snapshot_date` | `CAST(dest.snapshot_date AS DATE)` | `Mapped` | Cast to DATE. |
| `currency_code` | `N/A` | `N/A` | `NULL` | `Not mapped` | No canonical currency source in Brink destination payload. |

## Technical and ETL property mappings

| Curated Column | Brink Staging Table | Brink Property Path | Current mapping | Status | Notes |
|---|---|---|---|---|---|
| `source_system` | `N/A` | `N/A` | constant `'brink_pos'` | `Derived constant` | Warehouse constant. |
| `source_destination_id` | `staging.brink_settings2_get_destinations` | `destination_id` | `CAST(dest.destination_id AS VARCHAR(199))` | `Mapped` | Brink destination ID cast to string for reconciliation. |
| `destination_key` | `N/A` | `N/A` | `NULL` | `Not mapped` | Warehouse-generated key, not assigned by current insert. |
| `tenant_key` | `N/A` | `N/A` | `NULL` | `Not mapped` | Warehouse-generated tenant key, not assigned by current insert. |
| `tenant_name` | `N/A` | `N/A` | parameter `@tenant_id` | `ETL context` | Populated from ETL context, not from Brink payload. |
| `effective_from_utc` | `N/A` | `N/A` | `NULL` | `Not mapped` | SCD2 column deferred. |
| `effective_to_utc` | `N/A` | `N/A` | `NULL` | `Not mapped` | SCD2 column deferred. |
| `is_current` | `N/A` | `N/A` | `NULL` | `Not mapped` | SCD2 column deferred. |
| `_etl_batch_id` | `staging.brink_settings2_get_destinations` | `_etl_batch_id` | `dest._etl_batch_id` | `Mapped` | ETL metadata propagated from staging. |
| `_etl_source_type` | `staging.brink_settings2_get_destinations` | `_etl_source_type` | `dest._etl_source_type` | `Mapped` | ETL metadata propagated from staging. |
| `_etl_ingested_at` | `staging.brink_settings2_get_destinations` | `_etl_ingested_at_utc` | `dest._etl_ingested_at_utc AS _etl_ingested_at` | `Mapped` | ETL metadata propagated from staging. |
