comsysto / eCharm

MIT License
3 stars 3 forks source link

Using hashed lat/long for BNA's source_id leads to error #30

Open stefanpernpaintner opened 1 year ago

stefanpernpaintner commented 1 year ago

Currently the source_id value for BNA's charging stations is filled with the has value over lat/long. This leads to the situation that some charging stations have the same hash value because they have the same lat/long values set (most likely by error) and this in turn leads to the fact that some stations cannot be imported because of a unique key constraint error (source_id has to be unique)

I think we should generate the hash over all attributes of the BNA's charging station to avoid the described situation

mjmader commented 9 months ago

Actually the problem is that the rows of the BNA data (and also FR data btw) have changed over time to resemble charge points of charging stations, rather than just a charging station per row. In effect, we have to do some preprocessing to flatten serveral charge points into a single station. On the other hand, this is also important for https://github.com/comsysto/eCharm/issues/28, maybe it is better to change our schema to actually handle charge points