Using Aliases to Map to a Database

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

  1. 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,

  2. Next, in the same etc/application.conf file, navigate to the elixir.data.mongodb tag and point your key name to a value (i.e. your MongoDB database name)
    for example,

  3. Save your etc/application.conf file and start the Ambience server.

  4. 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,
    image

  • Upon inferring the schema, the database columns should be successfully retrieved.
    For example,
    image


  • 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.
    image

**
"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
**