nijikokun / generate-schema

🧞 Convert JSON Objects to MySQL, JSON Schema, Mongoose, Google BigQuery, Swagger, and more.
MIT License
1.04k stars 136 forks source link

DATE inference for BigQuery is incorrect #49

Open sqlrob opened 5 years ago

sqlrob commented 5 years ago

Given an object such as

{
  dateField: "2019-03-04 12:13:14"
}

A BigQuery schema is generated that considers that a DATE. If you then attempt to insert into the table with that same object, the insert fails because BigQuery doesn't parse the field as a date