This entry walks you through a feature to hardened database mapping by allowing the use of aliases to map to a database with the help of a lookup table.
Setup
-
In your
etc/application.conf
file, navigate to the following lines below and input in a unique key name to be used to point to your database.
for example,
-
Next, in the same
etc/application.conf
file, navigate to theelixir.data.mongodb
tag and point your key name to a value (i.e. your MongoDB database name)
for example,
-
Save your
etc/application.conf
file and start the Ambience server. -
For verification, add a sample MongoDB dataset using the “Datasets” module.
The two keys defined above should appear under the “Database” dropdown field.
(i.e. “AAA” & “BBB”)
All corresponding collections created as part of the defined database should also appear under the “Collection” field.
For example,
Upon inferring the schema, the database columns should be successfully retrieved.
For example,
- Additionally, in the Dataset Management Page, do look through and edit the necessary database name(s) to match the new aliases to prevent any discrepancy.
**
"This could potentially break existing configurations, for example you might (unlikely) have a name in the datasets list, which isn’t mapped in the ETL database aliases.
So I have added a fallback. If you add this to your config:
ambience.datasets.hardened-database-mapping = false
**