Added data calculs during exports from postgres to mongo #266
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prerequisite : postgis must be installed on postgres DB
I. Context
In the new internal main postgres DB (where we store the data from BAL with BAN-ID), we do not store data that does not come from the BAL. As a consequence, we don't have the additional data we need : fantoir code, postal code, map tiles, ...
II. Enhancement
This PR aims to calculate, during the export from postgres to mongo, the following data :
III. How to test
1- Download a BAL (csv)
2- Use the 'initBALIntoBAN' script of ID-Fix to push data into the BAN DB
3- Wait a few seconds for the export to be done
4- Check in your mongoDB to check on common toponyms and addresses "meta"
Exemple of an address that has those extra data calculated :
Exemple of a common toponym :