jehugaleahsa / FlatFiles

Reads and writes CSV, fixed-length and other flat file formats with a focus on schema definition, configuration and speed.
The Unlicense
357 stars 64 forks source link

Optional Columns #99

Open roman-kern-dev opened 1 month ago

roman-kern-dev commented 1 month ago

Hello together,

it is possible to create a optional column, which will be ignored, if no value is provided?

for example, if I have entries like

column 1 | column 2 | column 3 column 1 | column 2

the reader run into the record error with the exception

The record did not have the number of columns specified in the schema. Record 2.

I have already unsuccessfully tried with Nullable and Default Value.

Maybe you can provide Optional(true|false) method to the PropertyMapping