Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

can't handle same headers in different order #1

Open
seamusabshere opened this issue Jan 16, 2019 · 1 comment
Open

can't handle same headers in different order #1

seamusabshere opened this issue Jan 16, 2019 · 1 comment
Labels
enhancement faraday Requested by Faraday

Comments

@seamusabshere
Copy link
Member

$ cat a.csv
city,state
burlington,vt

$ cat b.csv
state,city
wi,madison

$ catcsv a.csv b.csv
city,state
burlington,vt
Error: error reading 'b.csv
Caused by: CSV headers are different from the first file's
@emk
Copy link
Contributor

emk commented Feb 12, 2019

Yes, this is definitely not supported at the moment, by design. If this comes up on a regular basis, we could definitely add a mode where we:

  1. Parse the second and later CSVs if the columns don't match the first.
  2. Shuffle the columns around.
  3. Re-serialize the CSVs.

This might also find its way into dbcrossbar at some point, which will eventually need a mode where it parses the CSV file and manipulates it while piping it through.

@emk emk added the faraday Requested by Faraday label Jan 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement faraday Requested by Faraday
Projects
None yet
Development

No branches or pull requests

2 participants