Skip to content

fix: use segments from kafka instead of fivetran [CM-1082]#3983

Merged
mbani01 merged 1 commit intomainfrom
fix/updated_segments_table_in_snowflake
Mar 31, 2026
Merged

fix: use segments from kafka instead of fivetran [CM-1082]#3983
mbani01 merged 1 commit intomainfrom
fix/updated_segments_table_in_snowflake

Conversation

@mbani01
Copy link
Copy Markdown
Contributor

@mbani01 mbani01 commented Mar 31, 2026

This pull request updates the segment resolution logic in several Snowflake connector integrations to use the ANALYTICS.BRONZE_KAFKA_CROWD_DEV.SEGMENTS table instead of the previous ANALYTICS.SILVER_DIM._CROWD_DEV_SEGMENTS_UNION table. 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:

  • Updated all references in comments and queries from ANALYTICS.SILVER_DIM._CROWD_DEV_SEGMENTS_UNION to ANALYTICS.BRONZE_KAFKA_CROWD_DEV.SEGMENTS for 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.SEGMENTS instead of ANALYTICS.SILVER_DIM._CROWD_DEV_SEGMENTS_UNION.

This update is applied consistently to both the main cdp_matched_segments CTE and the incremental new_cdp_segments logic 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.

Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
@mbani01 mbani01 requested a review from joanagmaia March 31, 2026 14:33
@mbani01 mbani01 self-assigned this Mar 31, 2026
Copilot AI review requested due to automatic review settings March 31, 2026 14:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_segments and new_cdp_segments CTEs to select segments from ANALYTICS.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.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@mbani01 mbani01 merged commit d953ce0 into main Mar 31, 2026
22 checks passed
@mbani01 mbani01 deleted the fix/updated_segments_table_in_snowflake branch March 31, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants