Import Management

Description

The Import Module provides the most straightforward way to load data into any MongoDB instance that Ambience has write access to. Simply prepare a file (e.g. XLSX, CSV) and import it into a MongoDB collection. The collection (in the default and recommended config) is easily accessible through the Ambience modules, such as ETL Module, Dataset Module and Dashboard Module.

Import

The Import page allows you to perform the following:

  • Import new data into the database
  • Append data onto an existing data collection
  • Overwrite data of an existing data collection

To import the data, browse to the location of the data file. By default the filename of the import file is used in the “Name” field. You can change it if desired. Select the database to import to in the “Database” field and select the appropriate action to be carried out in the “Action” field. By default the filename of the import file is used in the “Collection” field if “New Data” is selected. You can change it if desired. If the data is to overwrite or append onto an existing data collection, select the appropriate data collection from the drop-down list. Click on the “Run” button to import the data file.

A message will appear to inform you if the import is successful or not. An error message will appear is there is any conflict (such as, if “New Data” selected and the data collection already exist).

Example: Import CSV File

To import the data, browse to the location of the CSV file. By default the filename for the import file is used in the “Name” field. Provide a brief description of the data in the “Description” field (optional). If there is more than one database collection in the MongoDB, select the appropriate database in the “Database” field.

New Data

If the data to be imported is a new collection, select “New Data” in the “Action” field. By default the filename of the import file is used in the “Collection” field. You can change it if desired. Click on the “Run” button to import the data file. The CSV Schema Setup dialog box will appear, prompting you to set up the schema for the data.

Select according and click on the “Import” button to import the data. Click on the “Cancel” button to abort the action. Upon successful import, a message will appear.

Existing Data

If the data is to overwrite or append onto an existing data collection, select either “Append Data” or “Overwrite Data” in the “Action” field. Select the data collection from the drop-down list.

In the case where “Append Data” is selected, if the data ID matches that of the existing data, select the "Strip _id“ field. To overwrite the existing data, ”Strip _id" checkbox remains unchecked.

The CSV Schema Setup dialog box will appear, prompting you to set up the schema for the data. Click on the “Import” button to import the data file. A message will appear to inform you that the data file is imported successfully.

History

The History page allows you to view all the imported data and their details.

You can arrange/sort the list in ascending or descending order by clicking on the desired field. By default, the list is sorted with the latest import at the top.

Refresh

After performing actions on the browser/tab, the list is reloaded to display the list of imported data. The manual “Refresh” button is available and is particularly useful if there are others making changes on the same page.

The “Refresh” button is found on the upper right corner of the page. Clicking on it reloads the list.

History Detail

You can view the details of the imported data by clicking on the “History Detail” icon under the “Actions” column corresponding the desired data.

The “History Detail” panel will appear, providing details of the imported data.

Click on the “Cancel” button to close the panel.

Search

There is a cross-field search function for the list of imported data. It is located at the upper left corner of the page.

This provides an easy way to search through the imported data list. It is case-insensitive and displays files that have the entered search value in any of the values of the fields below:

  • Name
  • Database
  • Collection
  • By
  • Description