The following code defined a schema of CSV file and it will be used to load a lot CSV files. However, there are some data error, for example, date not in correct format, missing data for required fields, etc. How to generate reports for the files using the schema for all the invalid data. And the Load will only be executed if there is no error.
type MyCsvType = CsvProvider<Schema = "A (int), B (string), C (date)", HasHeaders=true>
MyCsvType.Load(myFile) // Execute when there is no data error
A proposed error report example:
A Rows with missing values: 20, 40, 60, ... Rows with invalid values: 30(NaN), 31(Xyz), .... B C Rows with invalid values: 200 (2015Q1), ....