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.
I ran the following code:
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