oeg-upm / morph-rdb

Virtual Knowledge Graph Creation from RDB with R2RML
https://morph.oeg.fi.upm.es/tool/morph-rdb
Other
42 stars 38 forks source link

Month lost in DATE #48

Closed ailintom closed 5 years ago

ailintom commented 5 years ago

I have a problem importing dates from MySQL (MariaDB).

I have a column with the DATE datatype, and the Morph transforms 2019-04-19into "2019-00-19"^^<http://www.w3.org/2001/XMLSchema#date> (month turned to 00). I tried setting input.date.pattern=yyyy-MM-dd in .properties, but it does not help.

When I convert my MySQL column to DATETIME, everthing works like charm with the same dataset.

fpriyatna commented 5 years ago

Hi, this is a weird issue and unfortunately, I can't reproduce this one with MariaDB. Can you share your database and mappings with me?

ailintom commented 5 years ago

Here is the database (foo.sql), mappings new_r2rml.ttl, properties and result foo.zip

Maybe this has to do with my German locale. Anyway this is not a very huge problem, because I am getting troubles all the way with validating my rdf data when I use Date type; hence, I decided to cast all dates as datetime in my sql queries.

fpriyatna commented 5 years ago

Hi there, I have just added a new property output.date.locale=GERMANY but apparently, it is not the issue of locale, but the output format. I have just fixed the issue and now it generates the correct values for MariaDB Date (and DateTime) types.