Repository navigation
feat(converter): add by_extension and tsv formats - #145
Open
Ankur Gupta (ankur-pattern) wants to merge 2 commits into
Open
Ankur Gupta (ankur-pattern) wants to merge 2 commits into
Ankur Gupta (ankur-pattern) wants to merge 2 commits into
Conversation
3 of 4 tasks
7 of 10 tasks
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the per-file format routing and TSV conversion changes.
No open issues 🎉
What changed in this PR
Adds per-file format selection to converter tasks, allowing one pipeline to process reports arriving as XLSX or TSV.
Changes:
- Adds
by_extensionrouting with per-format configuration and validation. - Adds whole-file TSV-to-CSV conversion.
- Documents the options and adds unit tests and a mixed-format example pipeline.
| File | Description |
|---|---|
test/pipelines/converter/by_extension.yaml |
Demonstrates XLSX and TSV conversion in one task. |
test/pipelines/converter/by_extension.tsv |
Provides sample TSV input. |
internal/pkg/pipeline/task/converter/tsv.go |
Implements TSV-to-CSV conversion. |
internal/pkg/pipeline/task/converter/README.md |
Documents extension routing and TSV behavior. |
internal/pkg/pipeline/task/converter/converter.go |
Adds converter selection by file extension. |
internal/pkg/pipeline/task/converter/converter_test.go |
Tests conversion, routing, and configuration errors. |
Review effort: Balanced
Author
|
/argus review |
Ankur Gupta (ankur-pattern)
force-pushed
the
DATA-12008-converter-by-extension
branch
from
December 2, 2026 09:18
6ed9014 to
e94bed2
Compare
Ankur Gupta (ankur-pattern)
force-pushed
the
DATA-12008-converter-by-extension
branch
from
December 2, 2026 09:19
e94bed2 to
5e90787
Compare
Author
|
/argus review |
Aditya Muley (aditya2muley)
approved these changes
Dec 4, 2026
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
format: by_extensionto theconvertertask. Each record is converted with the converter listed underextensionsfor the extension of the file it was read from (CATERPILLAR_FILE_NAME_WRITE, set by thefileandsftptasks), so one pipeline can handle a source that arrives as either.xlsxor.tsv. A record whose extension is not listed is an error.tsvformat that converts a whole tab-separated file into one CSV record.Test plan
go build ./...,go vet -copylocks=false ./...,go test -race ./....xlsxand a.tsvthrough oneby_extensionconverter: the workbook gives one CSV record per sheet, and the TSV gives one CSV record with quotes, commas and CRLF line endings handled.csvwith onlytsvlisted fails withno converter configured for file "report.csv"test/pipelines/converter/convert_xls.yamlbehaves as onmain