Skip to content

feat(warehouse): support jsonPaths for gcs datalake - #7333

Merged
krishna2020 merged 7 commits into
masterfrom
harness/AI-1394-feat-warehouse-support-jsonpath-4f3797b1
Sep 3, 2026
Merged

krishna2020 merged 7 commits into
masterfrom
harness/AI-1394-feat-warehouse-support-jsonpath-4f3797b1

Conversation

@rudder-devbox

@rudder-devbox rudder-devbox Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Description

Adds GCS Datalake to the warehouse destinations that honor destination-config jsonPaths. Configured nested objects are marshaled into JSON strings and stored as string columns, reusing the existing parquet string mapping.

Tests added/updated:

  • destination option support now includes GCS_DATALAKE
  • transformer case verifies track.context.traits and track.properties.metadata are preserved as JSON string columns and no longer flattened

Linear Ticket

AI-1394

Security

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

Validation

  • gofmt -w processor/internal/transformer/destination_transformer/embedded/warehouse/internal/utils/utils.go processor/internal/transformer/destination_transformer/embedded/warehouse/options_test.go processor/internal/transformer/destination_transformer/embedded/warehouse/transformer_test.go && go test -count 1 -run 'TestDestinationOptions' ./processor/internal/transformer/destination_transformer/embedded/warehouse initially timed out at 120s during package setup.
  • go test -count 1 -run 'TestDestinationOptions' ./processor/internal/transformer/destination_transformer/embedded/warehouse → passed.
  • go test -count 1 -run 'TestTransformer/GCS_Datalake_jsonPaths_stores_nested_objects_as_JSON_strings' ./processor/internal/transformer/destination_transformer/embedded/warehouse → passed.
  • make -C /workspace/rudder-server fmt → passed.
  • git -C /workspace/rudder-server diff --check → passed.
  • go test -count 1 ./processor/internal/transformer/destination_transformer/embedded/warehouse/internal/utils/... → passed.
  • go test -count 1 -run 'TestDestinationOptions|TestTransformer/GCS_Datalake_jsonPaths_stores_nested_objects_as_JSON_strings' ./processor/internal/transformer/destination_transformer/embedded/warehouse → passed.
  • go test -count 1 ./processor/internal/transformer/destination_transformer/embedded/warehouse/... → passed.

@rudder-devbox

rudder-devbox Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

👋 I'm rudder-devbox. I opened this PR from a Linear ticket.

Mention @devbox or @rudder-devbox and I'll act on it — on a top-level PR comment,
in a review summary, or on an inline comment on the diff. Without a mention I won't see it.

@codecov

codecov Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.26%. Comparing base (f244c14) to head (0c8634a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7333      +/-   ##
==========================================
- Coverage   80.33%   80.26%   -0.07%     
==========================================
  Files         612      612              
  Lines       68676    68676              
==========================================
- Hits        55169    55121      -48     
- Misses      10262    10315      +53     
+ Partials     3245     3240       -5     

☔ View full report in Codecov by Harness.
📢 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.

@krishna2020
krishna2020 marked this pull request as ready for review September 2, 2026 12:08
@krishna2020
krishna2020 force-pushed the harness/AI-1394-feat-warehouse-support-jsonpath-4f3797b1 branch from e739cc1 to f03ded6 Compare September 2, 2026 12:09
@rudder-devbox

rudder-devbox Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

I inspected the failed job logs. The root cause is infrastructure, not a code/test failure in the GCS Datalake jsonPaths change: TestMainFlow/common_connection_pool_to_database failed in setup at integration_test/docker_test/docker_test.go:345 because Docker could not fetch the Kafka dependency image manifest from the configured ECR DockerHub mirror:

API error (500): Head "https://422074288268.dkr.ecr.us-east-1.amazonaws.com/v2/docker-hub/bitnamilegacy/zookeeper/manifests/3.9-debian-11": read tcp ...: read: connection timed out

The later panic: runtime error: invalid memory address or nil pointer dereference happens during cleanup after that setup failure, in github.com/rudderlabs/rudder-go-kit/testhelper/docker/resource/kafka.Setup.func1, so it is a secondary teardown effect. I did not make or push a code change because there is no repo-local fix for the failed ECR/image fetch from this workspace; the appropriate action is to rerun the failed CI job once the registry/network path is healthy.

@achettyiitr

Copy link
Copy Markdown
Member

@rudder-devbox Let's add integration test as well warehouse/integrations/datalake/datalake_test.go for jEvents flow JSON paths.

@rudder-devbox

rudder-devbox Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Added GCS Datalake jEvents integration coverage in warehouse/integrations/datalake/datalake_test.go. The new case sends a track event with jsonPaths configured, then reads the generated GCS Parquet files and asserts Context_traits / Metadata are JSON string columns while the flattened subfields are absent. Fixed in 505e5a3.

Validation passed for go test -count 1 ./warehouse/integrations/datalake, the targeted transformer JSON-path tests, make fmt, and git diff --check. I also tried SLOW=1 go test -count 1 -run 'TestIntegration/Events_flow/GCSDatalake_JSON_paths' ./warehouse/integrations/datalake, but the existing shared datalake compose setup failed before the subtest ran because Docker could not pull mcr.microsoft.com/azure-storage/azurite:latest.

@rudder-devbox

rudder-devbox Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Knowledge distillation completed

@achettyiitr

Copy link
Copy Markdown
Member

@rudder-devbox Fix lint issue.

@rudder-devbox

rudder-devbox Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

I fixed the lint failure and pushed the change.

The failed verify / lint log showed golangci-lint v2.9.0 reporting one issue: warehouse/integrations/datalake/datalake_test.go:1126:127: eventRecords - uuidFormat always receives "2023-01-01" (unparam). The helper parameter became redundant because all four call sites passed the same UUID date-prefix format.

I removed the uuidFormat parameter from eventRecords, kept the constant inside the helper, and updated the S3, GCS, Azure, and GCS jsonPaths call sites.

Validation passed:

  • go run github.com/golangci/golangci-lint/v2/cmd/[email protected] run -v
  • go test -count 1 -run '^$' ./warehouse/integrations/datalake
  • git diff --check

Commit: 8876a9f

@rudder-devbox

rudder-devbox Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Knowledge distillation completed

@rudder-devbox

rudder-devbox Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Removed the redundant uuidFormat parameter from the datalake record helper and its call sites, which clears the unparam lint issue. Fixed in 8876a9f.

Validation passed: go run github.com/golangci/golangci-lint/v2/cmd/[email protected] run ./warehouse/integrations/datalake ./processor/internal/transformer/destination_transformer/embedded/warehouse, go test -count 1 ./warehouse/integrations/datalake, and git diff --check. I also ran full make lint; the Go lint/actionlint phases passed, then gitleaks failed on pre-existing findings from base commit 0a504397 in unrelated files, not this PR's files.

@rudder-devbox

rudder-devbox Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Knowledge distillation completed

@krishna2020
krishna2020 merged commit e714140 into master Sep 3, 2026
75 checks passed
@krishna2020
krishna2020 deleted the harness/AI-1394-feat-warehouse-support-jsonpath-4f3797b1 branch September 3, 2026 08:40
This was referenced Sep 7, 2026
mihir20 pushed a commit that referenced this pull request Sep 7, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.86.0-rc.1](v1.85.0...v1.86.0-rc.1)
(2026-09-07)


### Features

* backend config v2-to-v1 mapper
([#7315](#7315))
([887f6d2](887f6d2))
* **core:** capture the final recorded error for failed rETL records
([#7295](#7295))
([f4dc4d9](f4dc4d9))
* per-destination visibility at the destination-filter boundary
([#7283](#7283))
([3d83f02](3d83f02))
* user_suppression counter via suppressed dummy jobs
([#7325](#7325))
([77d3d37](77d3d37))
* **warehouse:** support jsonPaths for gcs datalake
([#7333](#7333))
([e714140](e714140))


### Bug Fixes

* rsources failed-records pagination drops records across failed-key
boundaries
([#7329](#7329))
([0a50439](0a50439))
* **warehouse:** stop logging full schemas on table-level schema
mismatch
([#7339](#7339))
([f244c14](f244c14))
* **warehouse:** upgrade clickhouse v2 driver
([#7332](#7332))
([e2c5cb9](e2c5cb9))


### Miscellaneous

* **ci:** remove unused Snyk policy file (SEC-409)
([#7317](#7317))
([d60b3c6](d60b3c6))
* make reporting 413 handling unconditional
([#7313](#7313))
([d2474e9](d2474e9))
* moving pyt contract tests
([#7327](#7327))
([8316af2](8316af2))
* **processor:** pipeline attribution in processor stats
([#7326](#7326))
([3e97f7c](3e97f7c))
* skip consent and connection-mode filtering for replays of non-existent
connections
([#7323](#7323))
([d2474e9](d2474e9))

---
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>
mihir20 pushed a commit that referenced this pull request Sep 8, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.86.0](v1.85.0...v1.86.0)
(2026-09-07)


### Features

* backend config v2-to-v1 mapper
([#7315](#7315))
([887f6d2](887f6d2))
* **core:** capture the final recorded error for failed rETL records
([#7295](#7295))
([f4dc4d9](f4dc4d9))
* per-destination visibility at the destination-filter boundary
([#7283](#7283))
([3d83f02](3d83f02))
* user_suppression counter via suppressed dummy jobs
([#7325](#7325))
([77d3d37](77d3d37))
* **warehouse:** support jsonPaths for gcs datalake
([#7333](#7333))
([e714140](e714140))


### Bug Fixes

* rsources failed-records pagination drops records across failed-key
boundaries
([#7329](#7329))
([0a50439](0a50439))
* **warehouse:** stop logging full schemas on table-level schema
mismatch
([#7339](#7339))
([f244c14](f244c14))
* **warehouse:** upgrade clickhouse v2 driver
([#7332](#7332))
([e2c5cb9](e2c5cb9))


### Miscellaneous

* **ci:** remove unused Snyk policy file (SEC-409)
([#7317](#7317))
([d60b3c6](d60b3c6))
* make reporting 413 handling unconditional
([#7313](#7313))
([d2474e9](d2474e9))
* moving pyt contract tests
([#7327](#7327))
([8316af2](8316af2))
* **processor:** pipeline attribution in processor stats
([#7326](#7326))
([3e97f7c](3e97f7c))
* skip consent and connection-mode filtering for replays of non-existent
connections
([#7323](#7323))
([d2474e9](d2474e9))

---
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