slingdata-io / sling-cli

Sling is a CLI tool that extracts data from a source storage/database and loads it in a target storage/database.
https://docs.slingdata.io
GNU General Public License v3.0
398 stars 27 forks source link

Allow flexible number of columns when reading CSVs #252

Closed alberttwong closed 5 months ago

alberttwong commented 5 months ago
Hello, is it possible to LOAD from CSV with variable number of columns, lets say there are files with 10 and 11 columns in them, is it possible to default missing column to NULL, or something and not get an error Value count does not match column count ? Or would I have to do multiple loads with strict=false property?
flarco commented 5 months ago

Coincidentally, I am working on the csv parser now for https://github.com/slingdata-io/sling-cli/issues/250. I was surprised that the go's default csv parser does not allow a custom escape character (only "). flexible columns sounds good.

flarco commented 5 months ago

Done, please use 1.2.4