Manage and share data from your MongoDB databases.

Integrate, join-up and extend data across your MongoDB databases. Build on value, lowering ongoing costs.

What are MongoDB and G8CC.

MongoDB is a popular open source database for web apps. It's a NoSQL document-oriented database. It provides a JSON-like format with optional schemas.

GARNET8 Collaboration Clouds (G8CC) provides a powerful data sharing layer. It allows you to seamlessly integrate and extend data value. That lowers delivery and ongoing costs.

This demonstrates how to integrate and extend a MongoDB database. G8CC provides a simple solution to seamless integrate and join-up information. This empower data mobility and secure, trusted data sharing.

Throughout our data source integration series we use employees data. We continue with this theme when connecting MongoDB. We have documented how to install, securely configure and restore an employees' MongoDB database here.

In this we focus on how to connect, extend and re-purpose data. This seamlessly integrates and builds on existing data in a MongoDB database.

First you need to add a MongoDB connector to G8CC.

To do this your need:

  • A MongoDB database and G8CC node running.
  • The following details for your connector.
    • Username and Password of the MongoDB database.
    • Host name. This can be an IP address, DNS name or "localhost" if your MongoDB database is running locally.
    • Port your MongoDB database is listening on. The default port for MongoDB is 27017.
    • Database and collection name that we are integrating. A collection in MongoDB is like a table.
  • MongoDB uses a JSON structure. This means we don't use SQL unlike in our MySQL and Postgres connectors. For MongoDB we use JSONPath syntax to extract data from our documents. These will get explained in greater details in the documentation.

Once you have these you can login to your G8CC administration interface. In the menu on the left your see a database icon. This is highlighted below with a green border (Fig 1.0). Click this to open your integrated data sources.

G8CC integrated data source menu item.

Fig 1.0

If you don't have any integrated data sources your have a box with a plus sign in it (Fig 1.1). You click this to add a new external data source connector. To start your configuration click the plus sign then Databases and MongoDB.

G8CC click button to add new data integrator.

Fig 1.1

Step one.

In the first dialog box you add the connectors title and description (Fig 1.2). The title gets displayed in a number of places. These include the integrated data source list and App Wizard integrator. The title should be descriptive.

Create a title and description for your data integrator.

Fig 1.2

Step two.

In this step configure the connection details (Fig 1.3). This defines what to connect to and how to authenticate.

Define the connection details for your data integrator.

Fig 1.3

Step three.

You now defined which G8CC containers can use this integrator (Fig 1.4). This provides flexibility and allows you to govern data.

G8CC containers that can use the data integrator.

Fig 1.4

Step four.

In step four we add two JSONPaths.

Our JSONPaths populate a list of options to choose. This uses a LIKE styled expression to query MongoDB. The query is case insensitive.

These paths extract first and last name from our JSON document. The MongoDB handler in G8CC automatically selects the _id as the key. This makes it very simple. You can see in the image below (Fig 1.5) our two paths.

You can add one or more JSONPaths. The title to the left should be descriptive. This is used to match against input within our G8CC App builder. To add more JSONPaths click the "Add" button.

JSONPaths that are used to extract data from our MongoDB documents.

Fig 1.5

Step five.

G8CC will copy the JSONPaths from step four. You can add additional JSONPaths. The column names get used by the App wizard. The document key "_id" is used to select a unique from our MongoDB database. This is similar to the findOne query built into the MongoDB command line.

Fig 1.6 below shows our JSONPath. For this we will continue with first and last name.

JSONPaths that are used to extract data from our MongoDB documents.

Fig 1.6

Save connector.

These are the minimum steps needed to create a connector. We can now "Save without update query" (Fig 1.7).

Create a G8CC data integrator.

Fig 1.7

You will see your new connector in the "Integrated data source" list (Fig 1.8).

New G8CC data integrator for MongoDB.

Fig 1.8

Creating a G8CC view to use data in the MongoDB database.

Creating a G8CC view to use data in the MongoDB database.

To do this we open G8CC's App Wizard. The first step is to create a title and description for our app (Fig 1.9). We can then click next.

G8CC App Wizard new title and description.

Fig 1.9

In our second step we create a view. For this we will use three input type (Fig 2.0). The first two inputs will use input (text). The third input (email) and fourth input (Telephone).

G8CC App Wizard input types.

Fig 2.0

To create a view you drag the input type and drop it in the highlighted green box. An input configuration screen will appear (Fig 2.1). Each input will use the following configuration:

Configure a new input for G8CC.

Fig 2.1

  1. Drag n' Drop Input (text) then type title "First Name". In the index section click text, then click "Save".
  2. Drag n' Drop Input (text) then type title "Last Name", then click "Save".
  3. Drag n' Drop Input (Email) then type title "Email", then click "Save".
  4. Lastly Drag n' Drop Input (Telephone) then type title "Number", then click "Save".

You will have created a view for your data (Fig 2.2).

Group of inputs that create a view in G8CC.

Fig 2.2

You've created a view. Now click "Next".

In our final screen we can define a title and integrate our MongoDB data source. A title is similar to "Subject" in email.

In the box at the top click "#", then select "First Name", press space, then hash (#) again. Now select "Last Name" (Fig 2.3). The values in our First and Last Name inputs will replace the titles after the "@".

Create G8CC information title.

Fig 2.3

Next we configure our data source integrator. Click "Integrate external data source". A dialog open, click "Add". In the next dialog click "Employees Mongo". We can now match our column names to the titles of our inputs (Fig 2.4).

The table below shows the relationships.

JSONPath Query Column View Title
first_name First Name:
last_name Last Name:

Map read query column names to G8CC input titles.

Fig 2.4

When this is complete click "Save".

We can now save the G8CC App. Scroll the page down and click the "Save" button at the bottom.

You've now created an G8CC view to manage your integrated data.

You can now integrate and share data. To do this click the () sign in the menu on the left of the screen. Now click "Employees". This opens the view we've just created. In the first input type 3 letters (Fig 2.5). This opens a pop-up with options below the input. You can click on one to select. This populates the first and last name inputs.

Postgresql data integrated into G8CC data sharing layer.

Fig 2.5

You've now integrated a MongoDB data source into your G8CC data sharing layer.

Easily integrate, join-up and extend information across your databases.

You can contact us here today if you don't understand or need help with you integration needs.

With G8CC you can:

Deploy anywhere.

Deploy our Application Platform on AWS, Microsoft Azure, Google Cloud Platform (GCP), Kubernetes, private cloud.

Access Management.

G8CC's flexibility allows you to manage your data building trust. That empowers you to add value to your data across traditional borders.

Save Money.

Remove duplicated effort and wastage. Harness and build on the value of digital and data, reducing delivery and ongoing costs.

Get started by: