chop-dbhi / data-models-validator

Set of tools for validating data that should conform to a data model.
1 stars 2 forks source link

Include context in error messages #6

Closed gracebrownecodes closed 8 years ago

gracebrownecodes commented 9 years ago

The first error I encountered was:

$ data-models-validator -model pedsnet -version 2.1.0 CARE_SITE.CSV
Validating against model 'pedsnet/2.1.0'
* Evaluating 'CARE_SITE' table in 'CARE_SITE.CSV'...
* Problem reading CSV header: line 0: [code: 202] Extra columns were detected in line

Which seems clear, except that I can't find anything wrong with the header on that file vs another file which passes, so it would be useful to see what the validator thinks is wrong...

Specifically, the erroring file has header:

CARE_SITE_ID,CARE_SITE_NAME,LOCATION_ID,PLACE_OF_SERVICE_CONCEPT_ID,PLACE_OF_SERVICE_SOURCE_VALUE,SPECIALTY_CONCEPT_ID,CARE_SITE_SOURCE_VALUE,SPECIALTY_SOURCE_VALUE

While a non-erroring file has header:

care_site_id,care_site_name,place_of_service_concept_id,location_id,care_site_source_value,place_of_service_source_value,specialty_concept_id,specialty_source_value

Perhaps there should be a verbosity flag that adds context to the errors?

gracebrownecodes commented 9 years ago

In fact, this header reading problem seems to go deeper, I'm getting it on almost all files I try the validator with.

gracebrownecodes commented 9 years ago

Perhaps a case issue? Or a line ending one?

bruth commented 9 years ago

It could be a line ending one. I will give you a new build in a minute.