Skip to content

misc(clickhouse): Define primary key for events_enriched table#5555

Merged
vincent-pochet merged 1 commit into
mainfrom
misc-events-enriched-pk
May 25, 2026
Merged

misc(clickhouse): Define primary key for events_enriched table#5555
vincent-pochet merged 1 commit into
mainfrom
misc-events-enriched-pk

Conversation

@vincent-pochet

@vincent-pochet vincent-pochet commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR sets the primary_key attribute for events_enriched and events_enriched_expanded tables.
These two tables does not define a primary key and this change allows us to use in_batch AR method with a cursor to loop over rows.

@vincent-pochet
vincent-pochet force-pushed the misc-events-enriched-pk branch from 5a3b1af to 45a419f Compare May 21, 2026 15:00
@vincent-pochet vincent-pochet changed the title misc(clickhouse): Define nil primary key for events_enriched table misc(clickhouse): Define primary key for events_enriched table May 22, 2026
Comment thread app/models/clickhouse/events_enriched.rb
Comment thread app/models/clickhouse/events_enriched_expanded.rb

@groyoh groyoh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's add a simple test to ensure no regression 🙏

@vincent-pochet
vincent-pochet force-pushed the misc-events-enriched-pk branch from 45a419f to 3459d02 Compare May 22, 2026 12:57
@vincent-pochet
vincent-pochet merged commit 9e58ade into main May 25, 2026
12 checks passed
@vincent-pochet
vincent-pochet deleted the misc-events-enriched-pk branch May 25, 2026 07:18
D1353L pushed a commit that referenced this pull request May 26, 2026
## Description

This PR sets the `primary_key` attribute for `events_enriched` and
`events_enriched_expanded` tables.
These two tables does not define a primary key and this change allows us
to use `in_batch` AR method with a `cursor` to loop over rows.
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.

3 participants