Repository navigation
feat: add BQSTREAM_V2 destination type and bqstreamv2 building blocks - #7056
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #7056 +/- ##
==========================================
- Coverage 79.74% 79.71% -0.03%
==========================================
Files 566 572 +6
Lines 64596 64927 +331
==========================================
+ Hits 51510 51758 +248
- Misses 10016 10073 +57
- Partials 3070 3096 +26 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
99b7d1c to
0153a25
Compare
shekhar-rudder
left a comment
There was a problem hiding this comment.
A few thoughts mostly around code reuse with the existing BQ stack and a handful of correctness/operability nits — nothing blocking.
shekhar-rudder
left a comment
There was a problem hiding this comment.
Submitting pending review.
shekhar-rudder
left a comment
There was a problem hiding this comment.
Simplification suggestions for tableschemacache.go
shekhar-rudder
left a comment
There was a problem hiding this comment.
Simplification suggestions for types.go
Add the BQSTREAM_V2 destination constant and enable warehouse-side support: route it to the BigQuery warehouse manager, treat it as a pseudo-warehouse destination, and add embedded warehouse transformer support (loaded_at column, JSON paths, users-table skip, reserved keywords).
Add the building blocks for the upcoming BQSTREAM_V2 async destination manager: package types and destination config decoding, BigQuery data type mapping, an in-memory table schema cache with TTL, and the Storage Write API managed-writer wrapper. No production code path reaches this package yet; the upload pipeline and registration land in the next PRs of the stack.
Add the remaining building blocks of the BQSTREAM_V2 manager: - event parsing from async files, per-table grouping and size-bounded chunking, and event-schema derivation - discard extraction for schema-mismatched values and duplicate ID detection - dynamic protobuf row encoding with numeric/timestamp coercion, plus an equivalence test against the protojson path and benchmarks - schema diffing (findNewColumns) and BigQuery error classification The Manager upload orchestration that ties these together lands in the next PR of the stack.
0153a25 to
7389a84
Compare
🔒 Scanned for secrets using gitleaks 8.29.1
shekhar-rudder
left a comment
There was a problem hiding this comment.
Two comments — both on events.go. One on a likely-unintentional scope of the []any marshalling branch in getDiscardedRecordsFromEvent, and one on a raw-vs-provider-cased table name divergence in groupAndChunkEvents.
shekhar-rudder
left a comment
There was a problem hiding this comment.
Three more — confusing error message in protoValueFor, blast radius of a single bad row in encodeRows, and a small reorder in NewStreamWriter that removes the need for the deferred close-on-error pattern.
🔒 Scanned for secrets using gitleaks 8.29.1
🤖 I have created a release *beep* *boop* --- ## [1.78.0-rc.1](v1.77.0...v1.78.0-rc.1) (2026-06-22) ### Features * add and register bq stream v2 async destination manager ([#7057](#7057)) ([787b7ac](787b7ac)) * add BQSTREAM_V2 destination type and bqstreamv2 building blocks ([#7056](#7056)) ([02e84e5](02e84e5)) * **batchrouter:** raise getImportingJobs max iterations and remove payload size limit ([#7076](#7076)) ([15707f6](15707f6)) * **gateway:** throttling support for internal batch endpoint ([#7055](#7055)) ([6b6ba65](6b6ba65)) * **jobsdb:** introduce compaction min ds age ([#7077](#7077)) ([4d6d97a](4d6d97a)) * **processor:** new intermediate jobsdb ([#7048](#7048)) ([dfef1f1](dfef1f1)) ### Bug Fixes * abort non-retryable Klaviyo upload errors instead of retrying ([#7085](#7085)) ([4c3e4f1](4c3e4f1)) * **batchrouter:** correlate poll results by externalId instead of whole-row hash ([09326d2](09326d2)) * **batchrouter:** report real status code and sample event for drained jobs ([#7104](#7104)) ([d3fab82](d3fab82)) * internal endpoints enabled in open source version of rudder-server ([#7075](#7075)) ([dc071cd](dc071cd)) * **jobsdb:** get jobs lateral join against the v_last view ([#7105](#7105)) ([853d14c](853d14c)) * klaviyo upload partial failures ([#7107](#7107)) ([37e79e9](37e79e9)) * **router:** shared barrier causing illegal job sequence errors ([#7101](#7101)) ([b5435ba](b5435ba)) ### Miscellaneous * add BQSTREAM_V2 integration tests ([#7058](#7058)) ([478e217](478e217)) * add rudderai announcement ([#7046](#7046)) ([ff02fe8](ff02fe8)) * bump codecov-action to 7.0.0 ([#7070](#7070)) ([31f0623](31f0623)) * cleanup embedded warehouse transformations ([#7072](#7072)) ([31f0623](31f0623)) * **deps:** bump actions/checkout from 6.0.2 to 6.0.3 ([#7084](#7084)) ([745d5ab](745d5ab)) * **deps:** bump aws-actions/configure-aws-credentials from 6.1.2 to 6.2.0 ([#7081](#7081)) ([19251cd](19251cd)) * **jobsdb:** refactoring and cleanup ([#7043](#7043)) ([2e4ea92](2e4ea92)) * remove legacy warehouse endpoints ([#7090](#7090)) ([6f85153](6f85153)) * rename bqstream all events ([#7088](#7088)) ([4d9ad19](4d9ad19)) * **router:** rename experimental buffer size calculator to dynamic ([#7103](#7103)) ([52896cd](52896cd)) * support using the full event schema key as pulsar ordering key ([#7086](#7086)) ([ff50611](ff50611)) --- 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>
🤖 I have created a release *beep* *boop* --- ## [1.78.0](v1.77.0...v1.78.0) (2026-06-22) ### Features * add and register bq stream v2 async destination manager ([#7057](#7057)) ([787b7ac](787b7ac)) * add BQSTREAM_V2 destination type and bqstreamv2 building blocks ([#7056](#7056)) ([02e84e5](02e84e5)) * **batchrouter:** raise getImportingJobs max iterations and remove payload size limit ([#7076](#7076)) ([15707f6](15707f6)) * **gateway:** throttling support for internal batch endpoint ([#7055](#7055)) ([6b6ba65](6b6ba65)) * **jobsdb:** introduce compaction min ds age ([#7077](#7077)) ([4d6d97a](4d6d97a)) * **processor:** new intermediate jobsdb ([#7048](#7048)) ([dfef1f1](dfef1f1)) ### Bug Fixes * abort non-retryable Klaviyo upload errors instead of retrying ([#7085](#7085)) ([4c3e4f1](4c3e4f1)) * **batchrouter:** correlate poll results by externalId instead of whole-row hash ([09326d2](09326d2)) * **batchrouter:** report real status code and sample event for drained jobs ([#7104](#7104)) ([d3fab82](d3fab82)) * internal endpoints enabled in open source version of rudder-server ([#7075](#7075)) ([dc071cd](dc071cd)) * **jobsdb:** get jobs lateral join against the v_last view ([#7105](#7105)) ([853d14c](853d14c)) * klaviyo upload partial failures ([#7107](#7107)) ([37e79e9](37e79e9)) * **router:** shared barrier causing illegal job sequence errors ([#7101](#7101)) ([b5435ba](b5435ba)) ### Miscellaneous * add BQSTREAM_V2 integration tests ([#7058](#7058)) ([478e217](478e217)) * add rudderai announcement ([#7046](#7046)) ([ff02fe8](ff02fe8)) * bump codecov-action to 7.0.0 ([#7070](#7070)) ([31f0623](31f0623)) * cleanup embedded warehouse transformations ([#7072](#7072)) ([31f0623](31f0623)) * **deps:** bump actions/checkout from 6.0.2 to 6.0.3 ([#7084](#7084)) ([745d5ab](745d5ab)) * **deps:** bump aws-actions/configure-aws-credentials from 6.1.2 to 6.2.0 ([#7081](#7081)) ([19251cd](19251cd)) * **jobsdb:** refactoring and cleanup ([#7043](#7043)) ([2e4ea92](2e4ea92)) * remove legacy warehouse endpoints ([#7090](#7090)) ([6f85153](6f85153)) * rename bqstream all events ([#7088](#7088)) ([4d9ad19](4d9ad19)) * **router:** rename experimental buffer size calculator to dynamic ([#7103](#7103)) ([52896cd](52896cd)) * support using the full event schema key as pulsar ordering key ([#7086](#7086)) ([ff50611](ff50611)) --- 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>
Description
PR 1/3 of the BQSTREAM_V2 stack (splits #7019).
Adds the
BQSTREAM_V2destination type, warehouse-side enablement, and all building blocks of the async destination manager — with no runtime behavior yet:Warehouse enablement
BQSTREAM_V2constant and treated it as a pseudo-warehouse destination (warehouse/utils).BQSTREAM_V2to the BigQuery warehouse manager inwarehouse/integrations/manager(FetchSchema/CreateSchema/CreateTable/AddColumnsreuse).loaded_atcolumn, JSON path support, full event column type (string), users-table skip, BigQuery reserved keywords.bqstreamv2 building blocks (
router/batchrouter/asyncdestinationmanager/bqstreamv2)events.go).encode.go), plus protojson equivalence test and benchmarks.findNewColumns) and BigQuery error classification (schemautils.go, + unit tests).Inert until the Manager orchestration is added and registered (PR 2/3).
Stack: PR 1 (this) → PR 2 (upload orchestration + registration) → PR 3 (integration tests)
Linear Ticket
Security
Validation
go build ./...go test ./router/batchrouter/asyncdestinationmanager/bqstreamv2/...go test ./processor/internal/transformer/destination_transformer/embedded/warehouse/...