source_record_id Dimension
Standard cross-source business record identifier for events, used for reconciliation and CAPI deduplication mappings.
source_record_id is a string-valued event dimension representing the
source-system business record identifier for an event.
Examples:
- timx contract events ->
contract_number(enrollment) /contract_sequence_id(renewed) - Stripe invoice events ->
invoice_id - Shopify order events ->
order_id
Why This Is a Dimension
source_record_id is broadly useful but not universal. Some events do not have
a meaningful business record ID (for example: GA4 pageviews, synthetic events).
Because it is not guaranteed on every event, it should not be added as a core
required column on nexus_events. The dimensions facet is the correct home.
How It Flows
- Source extraction emits EAV rows with
dimension_name = 'source_record_id' - Source-level
*_event_dimensionsmodels union those rows nexus_event_dimensions_unionedingests all enabled source dimensionsnexus_event_dimensionsdynamically pivots to asource_record_idcolumn- Output models join
nexus_event_dimensionsonevent_id(1:1 join)
CAPI Mapping Convention
Use source_record_id for destination-native deduplication fields:
- Facebook CAPI ->
event_id - Google Ads Enhanced Conversions ->
order_id
Retain the internal Nexus ID separately (for example nexus_event_id) for QA,
debugging, and reconciliation.
Timx Example (Extraction)
SELECT
{{ nexus.create_nexus_id('event_dimension', ['event_id', "'source_record_id'"]) }} as event_dimension_id,
event_id,
'source_record_id' as dimension_name,
CASE
WHEN event_name = 'enrollment' THEN contract_number
ELSE contract_sequence_id::VARCHAR
END as dimension_value,
occurred_at,
source
FROM {{ ref('timx_contract_events') }}
WHERE dimension_value IS NOT NULL