fix(csv): use configured field separator in parallel chunk path#2601
Open
atlan-owen wants to merge 2 commits into
Open
fix(csv): use configured field separator in parallel chunk path#2601atlan-owen wants to merge 2 commits into
atlan-owen wants to merge 2 commits into
Conversation
…484) CSVReader.streamRows() hardcoded comma in chunk write/read, crashing on non-comma-delimited files with CsvParseException. Promote fieldSeparator to a class field and use it at lines 190, 202, 219. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: atlan-owen <owen.price@atlan.com>
FileBasedDelta.getAssetChecksums() hardcoded ',' when parsing both the current and previous CSV files, so any delta-enabled import of a non-comma-delimited file failed with 'Unable to find the column typeName'. Plumb the configured separator through DeltaProcessor into FileBasedDelta (default ',' leaves cube/relational-assets-builder unchanged, as their compared files are internally generated). Adds SemicolonAIMTest: end-to-end semicolon import (multi-chunk parallel path) plus a full-delta second run, verified against a live tenant. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: atlan-owen <owen.price@atlan.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.
Summary
Fixes runtime handling of non-comma field separators in asset import (CSA-484, related to CSA-476 / gandalf#275). Two changes:
FileBasedDelta.getAssetChecksums()hardcoded','when parsing both the current and previous CSV files (getHeader+ reader builder). Any delta-enabled import (assets_delta_semantic=full) of a semicolon-delimited file fails withIOException: Unable to find the column 'typeName'. This commit plumbs the configured separator throughDeltaProcessor→FileBasedDelta. Defaults to',', so cube-assets-builder / relational-assets-builder (whose compared files are internally generated as comma CSVs) are unchanged.CSVReader.streamRows()hardcoded','in the parallel chunk write/read path. Empirically this was internally consistent (chunks written and re-read with the same comma separator), so it did not crash on its own — but it silently rewrote user data through a different dialect than configured, and any future divergence between the write and read sites would corrupt parsing. PromotedfieldSeparatortoprivate valand used it consistently.Evidence (verified against a live tenant, fs3)
New integration test
SemicolonAIMTest: imports a semicolon-delimited CSV of 102 assets (enough rows to split across multiple parallel chunk files), with descriptions containing commas and quoted semicolons, then runs a second full-delta pass (revised description + one dropped table).main(no fix)Unable to find the column 'typeName'(Importer.kt:244 → FileBasedDelta)11/11 tests pass on this branch; unit suite 65/65 (
package-toolkit/runtime).Also includes
CSVFieldSeparatorTest(unit) demonstrating the parse failure when a semicolon file is read with a comma separator.Customer impact
Semicolon is the default CSV separator for European-locale Excel. Euronext (ZD-126118) and BBVA (ZD-125771) both hit this. Note: uploads are currently blocked upstream by the gandalf validator (CSA-476, gandalf#275) — both changes need to ship for the customer flow to work end-to-end.
🤖 Generated with Claude Code