Skip to content

feat: support clickhouse day week month partitions - #6931

Merged
achettyiitr merged 4 commits into
masterfrom
harness/d5ee4358-cb35-43d3-ad45-0683522c4157-feat-support-clickhouse-day-week-mo-65qn
May 12, 2026
Merged

achettyiitr merged 4 commits into
masterfrom
harness/d5ee4358-cb35-43d3-ad45-0683522c4157-feat-support-clickhouse-day-week-mo-65qn

Conversation

@rudder-devbox

@rudder-devbox rudder-devbox Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Description

Support configurable ClickHouse partition granularity in warehouse table creation by reading destination config partitionType and generating PARTITION BY as one of:

  • toDate(received_at) for day (and default/fallback)
  • toStartOfWeek(received_at) for week
  • toStartOfMonth(received_at) for month

Applied this to both CreateTable and createUsersTable DDL paths. Added unit coverage for day/week/month, default behavior, case-insensitive parsing, and invalid-value fallback.

Linear Ticket

https://linear.app/rudderstack/issue/d5ee4358-cb35-43d3-ad45-0683522c4157

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@codecov

codecov Bot commented Apr 30, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.77778% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.04%. Comparing base (fdb2649) to head (18a6305).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
warehouse/integrations/clickhouse/clickhouse.go 77.77% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6931      +/-   ##
==========================================
- Coverage   80.09%   80.04%   -0.05%     
==========================================
  Files         565      565              
  Lines       63410    63439      +29     
==========================================
- Hits        50788    50782       -6     
- Misses       9636     9643       +7     
- Partials     2986     3014      +28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@achettyiitr
achettyiitr force-pushed the harness/d5ee4358-cb35-43d3-ad45-0683522c4157-feat-support-clickhouse-day-week-mo-65qn branch 3 times, most recently from 328d409 to e9ed375 Compare May 11, 2026 09:59
@achettyiitr
achettyiitr marked this pull request as ready for review May 11, 2026 09:59
@achettyiitr
achettyiitr force-pushed the harness/d5ee4358-cb35-43d3-ad45-0683522c4157-feat-support-clickhouse-day-week-mo-65qn branch from e9ed375 to bfae8fe Compare May 11, 2026 09:59
@achettyiitr
achettyiitr self-requested a review May 11, 2026 10:00
@achettyiitr
achettyiitr force-pushed the harness/d5ee4358-cb35-43d3-ad45-0683522c4157-feat-support-clickhouse-day-week-mo-65qn branch 2 times, most recently from bf5cbf6 to c4fedc8 Compare May 11, 2026 21:07
rudder-devbox and others added 4 commits May 12, 2026 02:38
🔒 Scanned for secrets using gitleaks 8.29.1
🔒 Scanned for secrets using gitleaks 8.29.1
🔒 Scanned for secrets using gitleaks 8.29.1
@achettyiitr
achettyiitr requested a review from krishna2020 May 11, 2026 21:09
@achettyiitr
achettyiitr force-pushed the harness/d5ee4358-cb35-43d3-ad45-0683522c4157-feat-support-clickhouse-day-week-mo-65qn branch from c4fedc8 to 18a6305 Compare May 11, 2026 21:09
@achettyiitr
achettyiitr merged commit 00ff494 into master May 12, 2026
72 checks passed
@achettyiitr
achettyiitr deleted the harness/d5ee4358-cb35-43d3-ad45-0683522c4157-feat-support-clickhouse-day-week-mo-65qn branch May 12, 2026 09:27
This was referenced May 12, 2026
itsmihir pushed a commit that referenced this pull request May 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.75.0-rc.1](v1.74.0...v1.75.0-rc.1)
(2026-05-12)


### Features

* snowpipe batch status
([#6926](#6926))
([f00dd89](f00dd89))
* support clickhouse day week month partitions
([#6931](#6931))
([00ff494](00ff494))
* support concurrency during partition migration flushing
([#6929](#6929))
([dd2f658](dd2f658))


### Bug Fixes

* **router:** delays in finding worker slots when event ordering is
disabled
([#6930](#6930))
([a7389f8](a7389f8))
* rsources failed keys batch fails to be inserted with postgres error
21000 ([#6940](#6940))
([3c7a1ec](3c7a1ec))
* salesforce bulk upload null and numeric CSV formatting
([#6923](#6923))
([5e67a45](5e67a45))


### Miscellaneous

* debug snowpipe streaming importing job size
([#6941](#6941))
([73d3bbe](73d3bbe))
* filtering overflow events for snowpipe streaming above 16MB
([#6921](#6921))
([2e5192b](2e5192b))
* pyt managed session
([#6910](#6910))
([c7aa7c4](c7aa7c4))
* remove deprecated fetch-tables endpoint
([#6944](#6944))
([fdb2649](fdb2649))
* sync release v1.74.0 to main branch
([#6920](#6920))
([e844f82](e844f82))
* workflow cleanup
([#6924](#6924))
([da7161d](da7161d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
itsmihir pushed a commit that referenced this pull request May 14, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.75.0](v1.74.0...v1.75.0)
(2026-05-12)


### Features

* snowpipe batch status
([#6926](#6926))
([f00dd89](f00dd89))
* support clickhouse day week month partitions
([#6931](#6931))
([00ff494](00ff494))
* support concurrency during partition migration flushing
([#6929](#6929))
([dd2f658](dd2f658))


### Bug Fixes

* **router:** delays in finding worker slots when event ordering is
disabled
([#6930](#6930))
([a7389f8](a7389f8))
* rsources failed keys batch fails to be inserted with postgres error
21000 ([#6940](#6940))
([3c7a1ec](3c7a1ec))
* salesforce bulk upload null and numeric CSV formatting
([#6923](#6923))
([5e67a45](5e67a45))


### Miscellaneous

* debug snowpipe streaming importing job size
([#6941](#6941))
([73d3bbe](73d3bbe))
* filtering overflow events for snowpipe streaming above 16MB
([#6921](#6921))
([2e5192b](2e5192b))
* pyt managed session
([#6910](#6910))
([c7aa7c4](c7aa7c4))
* remove deprecated fetch-tables endpoint
([#6944](#6944))
([fdb2649](fdb2649))
* sync release v1.74.0 to main branch
([#6920](#6920))
([e844f82](e844f82))
* workflow cleanup
([#6924](#6924))
([da7161d](da7161d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
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