OpenEnergyPlatform / open-MaStR

A collaborative software to download the energy database Marktstammdatenregister (MaStR)

Home Page:https://open-mastr.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discuss the behaviour for running API download after bulk download

FlorianK13 opened this issue · comments

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

  • check behaviour
  • explain behaviour in documentation