OpenEnergyPlatform / open-MaStR

A collaborative software to download the energy database Marktstammdatenregister (MaStR)
https://open-mastr.readthedocs.io/en/latest/
GNU Affero General Public License v3.0
84 stars 17 forks source link

Discuss the behaviour for running API download after bulk download #467

Closed FlorianK13 closed 8 months ago

FlorianK13 commented 11 months ago

I ran the following code:


   from open_mastr import Mastr
   db=Mastr()
   db.download(method="bulk")
   db.download(method="API")

When checking the database afterwards, most of the tables had 50 entries coming from the API. The EinheitMastrNr was still a unique key, hence the API did not write duplicate data to the database. However when checking the EinheitMastrNr from the units which came from the API, they were also included in the zipped xml files.

I conclude that the API overwrites entries. Is this intended?

I also saw that at least one unit fetched from the API had DatumLetzteAktualisierung from todays date, so this unit was not included in the bulk download.

TODO