medic / cht-sync

Data synchronization between CouchDB and PostgreSQL for the purpose of analytics.
GNU General Public License v3.0
4 stars 5 forks source link

Handle regular expressions for DBs to be synced #185

Closed njuguna-n closed 1 week ago

njuguna-n commented 1 week ago

Is your feature request related to a problem? Please describe. Add the ability to use regular expressions for values in the COUCHDB_DBS environment variable so that it is easier to add many users' databases without manually writing all of them out.

Describe the solution you'd like Handle regular expressions like medic-user* to sync CouchDB databases like medic-user-chw1-meta and medic-user-chw2-meta

Describe alternatives you've considered Manually adding all databases to the variable.

Additional context

dianabarsan commented 1 week ago

@njuguna-n What's the reason for syncing those databases? Sentinel should replicate all important documents into medic-users-meta and delete those docs from the individual meta databases. After the sync, the users meta databases should only contain read docs, which are completely irrelevant for analytics.

njuguna-n commented 1 week ago

I was adding it just in case we need data from the user databases. Closing this issue as we can update Sentinel to get any additional data required and not have to replicate the user databases.