frictionlessdata / tableschema-js

A JavaScript library for working with Table Schema.
http://frictionlessdata.io/
MIT License
82 stars 27 forks source link

Inferring on dates of format "yyyy-mm-dd", generates error #175

Closed pripley123 closed 4 years ago

pripley123 commented 4 years ago

When I used the datapackage js (which seems to call tableschema js for infer) to infer a csv with a columns of dates in the format yyyy-mm-dd, an error is generated. The python datapackage infer seems to be able to handle this scenario.

Steps to replicate: use a csv with a date column in the format "yyyy-mm-dd" and run an infer e.g., "Project_Entity_ID","Accident_type","Accident_Date","numbertest" "x3d3bc539-9aec-45e0-96a3-4e851068d5e2","motor vehicle","2018-04-01",4 "y2fc94c19-78d8-42a4-8e1a-0d8103340c72","recreational 12345678901 sport","2018-12-31",5 "za4832b32-25ac-41fc-96ca-7be5753b98b8","motor 1234 vehicle","2019-07-03",1

Expected: The date column to be inferred as a date

Actual:

Error: Descriptor validation error: Data does not match any schemas from "oneOf" at "/resources/1" in descriptor and at "/properties/resources/items/oneOf" in profile

Please preserve this line to notify @roll (lead of this repository)

roll commented 4 years ago

Thanks! It's fixed now