Join with some empty files
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 96
- PR merge metrics
- No merged PRs in 30d
Description
Prerequisites
- make sure you're are using the latest version by
csvtk version - read the usage
Describe your issue
- describe the problem
- provide a reproducible example
Input files:
$ echo -e "f,c1\n1,2" > 1.csv
$ echo -e "f,c2\n3,4" > 2.csv
$ echo -e "f,c3" > 3.csv
Two first files works fine:
$ csvtk join -f f --na NA --outer-join 1.csv 2.csv
f,c1,c2
1,2,NA
3,NA,4
But when including the empty file:
$ csvtk join -f f --na NA --outer-join 1.csv 2.csv 3.csv
[WARN] no data found in file: 3.csv
f,c1,c2
1,2,NA
3,NA,4
it does not show!
Any way that it shoes up, but just all NAs? For example:
f,c1,c2,c3
1,2,NA,NA
3,NA,4,NA
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the csvtk join command and reproduce the behavior with the three CSV files shown in the issue, including the empty-header-only file. Trace how input files with no data are handled and make the result retain that file's column with NA values, while preserving the existing outer-join output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100