Repository navigation
fix(warehouse): set explicit lineSep for deltalake csv copy - #7455
Merged
Merged
Conversation
Databricks' CSV reader with multiLine=true and no lineSep auto-detects the line separator from the start of the file. When the first row has a quoted value containing \r\n (e.g. SMTP bounce reasons), it picks \r\n and the real \n row terminators written by our CSV writer are treated as data, merging rows. The last column (uuid_ts) then holds "<ts>\n<next row's first column>", failing with CAST_INVALID_INPUT under ANSI mode or silently loading NULL and dropping rows otherwise. Our encoder always terminates rows with \n, so pin lineSep to \n for both the load COPY and the validation test-table COPY. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.29.1
Add a Load Table case that loads a CSV whose first row has a quoted \r\n value. Without an explicit lineSep, Databricks merges the rows (1 of 3 inserted); with the fix all rows load with values intact. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.29.1
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/1.89.x #7455 +/- ##
==================================================
- Coverage 84.51% 84.48% -0.03%
==================================================
Files 622 622
Lines 62057 62059 +2
==================================================
- Hits 52447 52431 -16
- Misses 9607 9625 +18
Partials 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
saikumarrs
approved these changes
Oct 7, 2026
# Description The `generate` job in `verify.yml` logged into Docker Hub with `DOCKERHUB_READONLY_TOKEN` only to pull `openapi-generator-cli`. Now that token has expired, the job fails on every PR. The job now logs into ECR with the existing `AWS_ECR_READ_ONLY_IAM_ROLE_ARN` OIDC role and pulls the image through the `docker-hub` pull-through cache, using a new `DOCKER_HUB_PREFIX` make variable (empty by default, so local runs are unchanged). This is the same change as rudder-ingestion-svc#709. ## Linear Ticket n/a ## Security - [x] The code changed/added as part of this pull request won't create any security issues with how the software is being used. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]> (cherry picked from commit 6e9f920)
…sv load Make the line-break load test table-driven over two fixtures, since Databricks auto-detects the line separator from the first row: one starts with a quoted \r\n, the other with a lone \r. Both files also carry quoted \n, embedded quotes, a comma, a leading space, and a mixed value. Assert the stored records before the row count so a regression prints the merged row. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.29.1
Merged
achettyiitr
pushed a commit
that referenced
this pull request
Oct 7, 2026
🤖 I have created a release *beep* *boop* --- ## [1.89.2](v1.89.1...v1.89.2) (2026-10-07) ### Bug Fixes * **warehouse:** set explicit lineSep for deltalake csv copy ([#7455](#7455)) ([1c7dfc2](1c7dfc2)) --- 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>
achettyiitr
added a commit
that referenced
this pull request
Oct 7, 2026
# Description Syncing patch release v1.89.2 to main branch **↓↓ Please review and edit commit overrides before merging ↓↓** BEGIN_COMMIT_OVERRIDE fix(warehouse): set explicit lineSep for deltalake csv copy (#7455) END_COMMIT_OVERRIDE --------- Co-authored-by: Akash Chetty <[email protected]> Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com> Co-authored-by: Aris Tzoumas <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Oct 12, 2026
Merged
mihir20
pushed a commit
that referenced
this pull request
Oct 12, 2026
🤖 I have created a release *beep* *boop* --- ## [1.90.0-rc.1](v1.89.0...v1.90.0-rc.1) (2026-10-12) ### Features * **processor:** add source_out reporting metric ([#7435](#7435)) ([909fba9](909fba9)) * **processor:** allow disabling event schemas v2 per source ([#7429](#7429)) ([a8c12b2](a8c12b2)) * **processor:** report dest_transformer diff rows for multiplexing destination transformations ([#7446](#7446)) ([cd95c32](cd95c32)) * **processor:** report dest_transformer succeeded for destinations without a destination transformation ([#7445](#7445)) ([21f7e41](21f7e41)) * **processor:** report user_transformer succeeded for destinations without a user transformation ([#7440](#7440)) ([f424257](f424257)) * **router:** mask live events destination credentials ([#7460](#7460)) ([5fa5fe2](5fa5fe2)) * **warehouse:** add Microsoft Fabric destination ([#7441](#7441)) ([74940c2](74940c2)) ### Bug Fixes * **batchrouter:** do not abort warehouse jobs on a zero failure timestamp ([#7426](#7426)) ([506f6d5](506f6d5)) * **batchrouter:** recover snowpipe streaming channels for tables dropped externally ([#7434](#7434)) ([93cd81d](93cd81d)) * **destination:** encode Lytics bulk upload URL values ([#7433](#7433)) ([08e6937](08e6937)) * **destination:** retry bqstream transport failures ([#7464](#7464)) ([cd3dc3e](cd3dc3e)) * **warehouse:** cap deltalake validation schema describes ([#7444](#7444)) ([d119779](d119779)) * **warehouse:** keep snowflake copy credentials out of logs ([#7442](#7442)) ([f91747b](f91747b)) * **warehouse:** set explicit lineSep for deltalake csv copy ([#7455](#7455)) ([cc22d18](cc22d18)) ### Miscellaneous * migrate self-hosted arm64 docker build runners to gha-runner-scale-set ([#7425](#7425)) ([5cdffde](5cdffde)) * **processor:** retire the destination-filter reorder, dedup and gw_ingested reporting flags ([#7450](#7450)) ([1040511](1040511)) * pull openapi-generator through the ECR pull-through cache ([#7449](#7449)) ([6e9f920](6e9f920)) --- 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
Oct 13, 2026
🤖 I have created a release *beep* *boop* --- ## [1.90.0](v1.89.0...v1.90.0) (2026-10-12) ### Features * **processor:** add source_out reporting metric ([#7435](#7435)) ([909fba9](909fba9)) * **processor:** allow disabling event schemas v2 per source ([#7429](#7429)) ([a8c12b2](a8c12b2)) * **processor:** report dest_transformer diff rows for multiplexing destination transformations ([#7446](#7446)) ([cd95c32](cd95c32)) * **processor:** report dest_transformer succeeded for destinations without a destination transformation ([#7445](#7445)) ([21f7e41](21f7e41)) * **processor:** report user_transformer succeeded for destinations without a user transformation ([#7440](#7440)) ([f424257](f424257)) * **router:** mask live events destination credentials ([#7460](#7460)) ([5fa5fe2](5fa5fe2)) * **warehouse:** add Microsoft Fabric destination ([#7441](#7441)) ([74940c2](74940c2)) ### Bug Fixes * **batchrouter:** do not abort warehouse jobs on a zero failure timestamp ([#7426](#7426)) ([506f6d5](506f6d5)) * **batchrouter:** recover snowpipe streaming channels for tables dropped externally ([#7434](#7434)) ([93cd81d](93cd81d)) * **destination:** encode Lytics bulk upload URL values ([#7433](#7433)) ([08e6937](08e6937)) * **destination:** retry bqstream transport failures ([#7464](#7464)) ([cd3dc3e](cd3dc3e)) * **warehouse:** cap deltalake validation schema describes ([#7444](#7444)) ([d119779](d119779)) * **warehouse:** keep snowflake copy credentials out of logs ([#7442](#7442)) ([f91747b](f91747b)) * **warehouse:** set explicit lineSep for deltalake csv copy ([#7455](#7455)) ([cc22d18](cc22d18)) ### Miscellaneous * migrate self-hosted arm64 docker build runners to gha-runner-scale-set ([#7425](#7425)) ([5cdffde](5cdffde)) * **processor:** retire the destination-filter reorder, dedup and gw_ingested reporting flags ([#7450](#7450)) ([1040511](1040511)) * pull openapi-generator through the ECR pull-through cache ([#7449](#7449)) ([6e9f920](6e9f920)) --- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Deltalake CSV loads can merge two rows into one when the first row in a load file has a quoted value containing
\r\n.COPY INTOreads our CSV load files withmultiLine = 'true'but nolineSep. In that mode, Databricks guesses the line separator from the start of the file. If the first row has a quoted value with\r\n(e.g. raw SMTP bounce reasons from Brazeusers.messages.email.SoftBounce), it picks\r\n. The real\nrow ends written by our Go CSV encoder are then read as data, and the next row's first column runs into the last column,uuid_ts:CAST_INVALID_INPUTonuuid_ts(value<ts>\n<next row's anonymous_id>), and the table load is aborted. This is what Betashares hits onusers_messages_email_soft_bounce(10 aborted uploads since Jul 5).uuid_tsis NULL and the merged row is lost without any error.Our encoder always ends rows with
\n, so this pins'lineSep' = '\n'in both CSVFORMAT_OPTIONSblocks: the load COPY and the validation test-table COPY.Parquet load files (
Warehouse.deltalake.useParquetLoadFiles) are not affected.Testing
Reproduced end-to-end in rudder-mini against the Databricks test warehouse (
ANSI_MODE=false), sending a 2-eventsoft_bouncebatch whose first event'sbounce_reasoncontains\r\n:uuid_ts\r\nin valued11977948\n\r\nIntegration test: added
TestIntegration/Load_Table/line_breaks_in_quoted_values. It's table-driven over two fixtures written with Go'sencoding/csv, because Databricks auto-detects the separator from the first row:testdata/crlf.csv.gz: row 1 has a quoted\r\ntestdata/cr.csv.gz: row 1 has a quoted lone\rBoth files also carry a quoted
\n, embedded quotes, a comma, a leading space and a mixed value. The test asserts every stored value, then the row count.spark.sql.ansi.enabled=true, with fixspark.sql.ansi.enabled=true, pre-fixCAST_INVALID_INPUT(customer's error)CAST_INVALID_INPUTThe full
Load_Tablegroup passes with the fix on both the SQL warehouse and an all-purpose cluster.CI: cherry-picked #7449 (ECR pull-through cache for openapi-generator), because the release branch still logs into Docker Hub with the expired
DOCKERHUB_READONLY_TOKEN.go build,go vetandgo test -count 1 ./warehouse/integrations/deltalake/...passLinear Ticket
Resolves INT-7282
Security
🤖 Generated with Claude Code