Repository navigation
fix: salesforce bulk upload null and numeric CSV formatting - #6923
Merged
fracasula merged 4 commits intoApr 29, 2026
Merged
Conversation
🔒 Scanned for secrets using gitleaks 8.28.0
achettyiitr
requested changes
Apr 29, 2026
achettyiitr
reviewed
Apr 29, 2026
🔒 Scanned for secrets using gitleaks 8.28.0
🔒 Scanned for secrets using gitleaks 8.28.0
achettyiitr
reviewed
Apr 29, 2026
🔒 Scanned for secrets using gitleaks 8.28.0
achettyiitr
approved these changes
Apr 29, 2026
krishna2020
reviewed
Apr 29, 2026
krishna2020
approved these changes
Apr 29, 2026
fracasula
approved these changes
Apr 29, 2026
ItsSudip
enabled auto-merge (squash)
April 29, 2026 12:24
fracasula
disabled auto-merge
April 29, 2026 14:09
Merged
fracasula
pushed a commit
that referenced
this pull request
Apr 29, 2026
🤖 I have created a release *beep* *boop* --- ## [1.74.1](v1.74.0...v1.74.1) (2026-04-29) ### Bug Fixes * salesforce bulk upload null and numeric CSV formatting ([#6923](#6923)) ([dec04f3](dec04f3)) --- 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>
atzoum
pushed a commit
that referenced
this pull request
May 12, 2026
# Description Syncing patch release v1.74.1 to main branch **↓↓ Please review and edit commit overrides before merging ↓↓** BEGIN_COMMIT_OVERRIDE fix: salesforce bulk upload null and numeric CSV formatting (#6923) END_COMMIT_OVERRIDE --------- Co-authored-by: Sudip Paul <[email protected]> Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
This was referenced May 12, 2026
Merged
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>
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.
🔒 Scanned for secrets using gitleaks 8.28.0
Description
Fixes two CSV-formatting bugs in the Salesforce Bulk Upload destination that surfaced for Fullscript while integrating against the Salesforce Bulk API.
Bug 1 — null values rendered as
<nil>. A trait whose JSON value wasnullarrived in the CSV as the literal four-character string<nil>, becausefmt.Sprintf("%v", nil)is what the writer was using. Salesforce treats this as a real text value rather than a null, polluting target fields and breaking validation rules. The fix renders top-level nulls as empty cells, which Salesforce treats as null/unset:Bug 2 — numeric values rendered in scientific notation. Because every JSON number lands in Go as
float64and%vfalls back to%g, any integer-valued number with more than ~6 significant digits switched to scientific notation. So a phone number1234567890was being uploaded as1.23456789e+09, and an array of IDs as[1.23456789e+09 9.87654321e+09]. The fix usesstrconv.FormatFloat(v, 'f', -1, 64)for floats — same round-trip precision guarantee, never scientific notation. Arrays and maps are emitted as JSON viajsonrs.Marshal, so nested numbers also stay plain and nested nulls render asnullinstead of<nil>.The formatter (
FormatCSVValue) lives inrouter/batchrouter/asyncdestinationmanager/commonso other async destinations (Bing Ads, Lytics, Marketo, SFTP, Snowpipe discards) that exhibit the same pattern can adopt it in follow-ups.Changes
common.FormatCSVValuehelper that:""for top-level nil so CSV cells become emptyfloat64viastrconv.FormatFloat(_, 'f', -1, 64)to avoid scientific notation[]anyandmap[string]anyas JSON viajsonrs.Marshal(e.g.[1234567890,9876543210],{"id":1234567890,"name":"foo"}); falls back tofmt.Sprintf("%v", v)if marshalling failsfmt.Sprintf("%v", v)for every other type so existing primitives (string, bool) are byte-identicalcreateCSVFilenow routes every cell throughcommon.FormatCSVValuecommon/utils_test.go) and end-to-end CSV tests for null cells and numeric cells (salesforce-bulk-upload/utils_test.go)Behavior change for arrays and maps
Composite values are now serialized as JSON instead of Go's default
fmt.Sprintf("%v", …)shape:["Go", "Python"][Go Python]["Go","Python"][1234567890, 9876543210][1.23456789e+09 9.87654321e+09][1234567890,9876543210]{"id": 1234567890}map[id:1.23456789e+09]{"id":1234567890}Primitive cells (strings, bools, small ints, fractional floats) and null cells are byte-identical to the old output where it was already correct.
The hash-based job-to-record matching in
matchRecordsToJobsis unaffected because Salesforce echoes the exact CSV cell back in success/failure records — both sides of the hash change together, anddataHashToJobIDhas no cross-run state.Linear Ticket
INT-6278 — Salesforce bulk upload: Fix null and array formatting
Security