uktrade / public-data-api

The source for the Department for International Trade's Public Data API
https://data.api.trade.gov.uk/
MIT License
5 stars 0 forks source link

feat: convert what seem to be dates to dates for ODS #164

Closed michalc closed 2 years ago

michalc commented 2 years ago

We can't really depend on SQLite telling us the types of columns of results - if these are from _reports, so some SQL, then SQLite doesn't preserve the type information in many cases.

So although this looks a bit hacky, it stands the best chance of consistently working as things are changed internally - a date should always come out of SQLite as a string in the format YYYY-MM-DD, and if something is in that format, it should be treated as a date.