fix: use segments from kafka instead of fivetran [CM-1082]#3983
Conversation
Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
There was a problem hiding this comment.
Pull request overview
This PR updates Snowflake connector segment-resolution CTEs to read from the Kafka-derived ANALYTICS.BRONZE_KAFKA_CROWD_DEV.SEGMENTS table instead of the legacy ANALYTICS.SILVER_DIM._CROWD_DEV_SEGMENTS_UNION source, aligning segment lookups across the affected integrations.
Changes:
- Switched
cdp_matched_segmentsandnew_cdp_segmentsCTEs to select segments fromANALYTICS.BRONZE_KAFKA_CROWD_DEV.SEGMENTS. - Updated inline module join documentation comments (where present) to reference the new segments table.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| services/apps/snowflake_connectors/src/integrations/tnc/enrollments/buildSourceQuery.ts | Segment resolution CTEs now read from Kafka segments table; updated join comment. |
| services/apps/snowflake_connectors/src/integrations/tnc/courses/buildSourceQuery.ts | Segment resolution CTEs now read from Kafka segments table; updated join comment. |
| services/apps/snowflake_connectors/src/integrations/tnc/certificates/buildSourceQuery.ts | Segment resolution CTEs now read from Kafka segments table; updated join comment. |
| services/apps/snowflake_connectors/src/integrations/cvent/event-registrations/buildSourceQuery.ts | Segment resolution CTEs now read from Kafka segments table. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
This pull request updates the segment resolution logic in several Snowflake connector integrations to use the
ANALYTICS.BRONZE_KAFKA_CROWD_DEV.SEGMENTStable instead of the previousANALYTICS.SILVER_DIM._CROWD_DEV_SEGMENTS_UNIONtable. This change is applied consistently across multiple modules and their associated queries, ensuring that all segment lookups reference the correct and up-to-date source.Segment resolution source update:
ANALYTICS.SILVER_DIM._CROWD_DEV_SEGMENTS_UNIONtoANALYTICS.BRONZE_KAFKA_CROWD_DEV.SEGMENTSfor segment resolution in the following modules:cvent/event-registrations/buildSourceQuery.ts[1] [2]tnc/certificates/buildSourceQuery.ts[1] [2] [3]tnc/courses/buildSourceQuery.ts[1] [2]tnc/enrollments/buildSourceQuery.ts[1] [2] [3]Note
Medium Risk
Moderate risk because it changes the Snowflake table used for segment resolution across multiple exports, which can alter which records are included or excluded if schemas/data differ.
Overview
Switches segment resolution in Snowflake connector source queries to use
ANALYTICS.BRONZE_KAFKA_CROWD_DEV.SEGMENTSinstead ofANALYTICS.SILVER_DIM._CROWD_DEV_SEGMENTS_UNION.This update is applied consistently to both the main
cdp_matched_segmentsCTE and the incrementalnew_cdp_segmentslogic in the Cvent event registrations and TNC certificates/courses/enrollments connectors, plus related inline documentation.Written by Cursor Bugbot for commit 811604e. This will update automatically on new commits. Configure here.