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
88 stars 19 forks source link

Add `deleted_market_actors` to data model #575

Closed FlorianK13 closed 1 month ago

FlorianK13 commented 1 month ago

Summary

There is still the problem, that deleted_market_actors has no primary key. Or at least in todays bulk download there are several entries with the same ID. It could be an error of todays download, but I doubt that.

However since the download crashes right now for all users, I would still publish this bug fix as soon as possible.

Fixes #572 Fixes #574

nesnoj commented 1 month ago

Thx for tackling this so quickly! Please update the docs too -> deleted_market_actors is missing in dataset.md (other tables) - BTW, they seem to be further tables missing here, e.g. deleted_units..

Will test your code asap.

FlorianK13 commented 1 month ago

Please update the docs too

Should we do this already now? The problem is that the download of deleted_market_actors fails because it has no primary key. So maybe we solve this first and then add it to the docs?

Or we update the docs but mention that there is a problem with deleted_market_actors?

FlorianK13 commented 1 month ago

Have you already solved this?

You're right. I got the same error but interpreted it as Not Unique, but that was a mistake from my side.

No I did not work further than that. If you want to implement a "catch this error and delete entries without an ID" loop, feel free :) I'm on a conference till friday and can only contribute with a small amount of time.

nesnoj commented 1 month ago

No need to extend the exception handling in this case: there are no empty values but the column name is supposed to be MarktakteurMastrNummer, not MastrNummer.