I’m trying to validate that a csv file has the number of fields defined in it’s 
Avro schema. Consider the following schema and CSVs. I would like to be able to 
reject the invalid csv as missing fields.

{
   "type" : "record",
   "namespace" : "nifi",
   "name" : "nifi",
   "fields" : [
      { "name" : "c1" , "type" :  ["null", "string"] },
      { "name" : "c2" , "type" : ["null", "string"] },
      { "name" : "c3" , "type" : ["null", "string"] }
   ]
}

Good CSV
c1,c2,c3
hello,world,1
hello,world,
hello,,

Bad CSV
c1,c2,c3
hello,world,1
hello,world
hello

Reply via email to