OpenEnergyPlatform / omi

Repository for the Open Metadata Integration (OMI). For metadata definition see metadata repo:
https://github.com/OpenEnergyPlatform/metadata
GNU Affero General Public License v3.0
7 stars 4 forks source link

Hotfixes/null values #33

Closed MGlauer closed 4 years ago

christian-rli commented 4 years ago

when running a translation from v1.4 to 1.4 from the metadata I downloaded from the OEP it's working. However when I use my own string it fails with the following error:

line 76, in create raise Exception("Unknown timestamp orientation:", value) Exception: ('Unknown timestamp orientation:', None)

"timestamp" is not a key in the current version of the metadata. Excerpt from https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/oemetadata/v140/example.json :+1: "temporal": { "referenceDate": "2016-01-01", "timeseries": { "start": "2017-01-01T00:00+01", "end": "2017-12-31T23:00+01", "resolution": "1 h", "alignment": "left", "aggregationType": "sum" } },

The metadata I downloaded seems to support an older version with the timestamp key:

"temporal": {"referenceDate": null, "start": "2015-01-01T00:00+01:00", "end": "2035-01-01T00:00+01:00", "resolution": "yearly", "timestamp": "left"}

MGlauer commented 4 years ago

Timestamp is a class in OMI. The compiled JSON should use alignment, though.

christian-rli commented 4 years ago

The table that I downloaded the metadata from used this as an original string:

https://github.com/OpenEnergyPlatform/data-preprocessing/blob/46959ffe4c4f185ed98c5f79bdef9ed1fa9fdd83/data-review/scenario.szenariendb_mmr_de.json

which also uses timestamp and it does work when I translate it to itself.