DATA SOURCES
/
MongoDB
Getting Started
Tutorials
Datasources
Functions
Spaces
Queues
Components
Self Hosted
Settings
REST API

MongoDB

Internal supports the latest versions of MongoDB 3.6, 4.0, 4.2, and 4.4.

How to connect

Display Name: Give your data source a name for use within Internal. 

Connection String: Depending on your MongoDB install, you’ll use one of the following connection strings. 

  • Your own managed clusters: mongodb://<username>:<password>@<host>[:port]/<authsource></authsource></host></password></username>
  • If you are leveraging the DNS seed list, use a connection string prefix of "mongodb+srv" rather than the standard mongodb. This will be required for Atlas.

authSource is the name of your database that contains the authentication information. 

Database: The name of the database (must match).

Note: To connect with Internal, your data source must be publicly accessible and configured to accept connections from Internal’s IP addresses.

34.66.153.118/32
35.225.125.80/32 

What happens when you connect

When you connect MongoDB to Internal, we'll generate the following for you automatically:

  1. A list, insert, update, and delete function for each collection in the database (if the connecting user account has these privileges). List functions read data from your tables and allow you to display that data in components.


Note: Functions will not be generated if no primary keys are found in the connected database.

MongoDB Pipelines

In some cases, you may want to create a view that combines data from various collections or elevates nested JSON fields to top-level attributes. To accomplish this, create a new MongoDB Functions (a.k.a. MongoDB Pipeline).  

Filtering and Sorting

While Internal enables filtering and sorting on all columns, we recommend indexing columns on large tables to improve performance. Supported operators vary by data type but include =, !=, <, <=",">, >=.</,>

Specifying Trusted Server Root Certificates

One can specify custom trusted server root certificates for specific data sources - Cassandra, HTTP, MongoDB, MySQL, PostgreSQL

  1. While setting up a new data source, ensure "require SSL" is selected
  2. In the righthand configuration panel, click the "Upload" button and select your certificate file
  1. Add the rest of the connection details and submit the form
  2. Test your DB connection by using it in a function in a Space

The parsed certificates completely replace the default system trusted certificates.

TLS Connections

TLS is enabled by default for all connections but it can be configured manually using the tls and tlsInsecure connection string options:

  • tlsInsecure can be used to configure certificate validation.
  • tls can be used to configure TLS.

If TLS is disabled, connections will not be private and your data will be visible to anyone in transit.