Search documentation...

K

MongoDB

Sync Document data from MongoDB to marketing, sales and other business applications

Overview

You'll need to allowlist Hightouch's IP addresses to allow our systems to contact your warehouse. Reference our docs to determine which IPs you need to allowlist.

The MongoDB source allows you to sync document data from your MongoDB cluster via Hightouch.

You can query data from collections or views, and sync to your destination.

Creating MongoDB source

Connection Details

Altas

If you are using MongoDB Altas, use the following instruction.

  1. Go to your cluster dashboard, click Connect.

    MongoDB Connect

  2. Choose Connect your application.

    MongoDB Connect Options

  3. Get Hostname, username and connection options.

    MongoDB Connect URL

Community and Enterprise Version

Use the hostname/IP, username and password to connect to your MongoDB cluster. For more information, check docs.

Make sure to whitelist Hightouch IPs so that it can reach your cluster. Check doc to add whitelist IPs. If you are using Altas, you can add whitelist IP from Security -> Network Access.

MongoDB Whitelist IPs

Create MongoDB Source

Fill in Hostname, Port, Username, Password and connection options

MongoDB Connect Form

Username and Password

Fill in the username and password that allows Hightouch to query data. To create a user in MongoDB, check here.

Protocol

Hightouch supports standard or SRV protocol to connect to your cluster.

If you are using MongoDB Atlas and the connection string begins with protocol mongodb+srv, please choose the SRV protocol to connect.

Port

Specify the port that your MongoDB cluster listens to. Defaults to 27017. You don't need to specify the port if you are using SRV protocol, as Hightouch will use the SRV record to look up hostname and port.

Connection Options

You can specify connection options when connecting to your cluster.

Use the format name=value, separated with the ampersand (&). Hightouch automatically appends connection options when connecting to your cluster. For examples, replicaSet=test&connectTimeoutMS=300000.

Tunnel

If your MongoDB cluster is behind private networking, you can use Tunnel to connect to your cluster. For more information, check Tunnel docs.

Create a model

Hightouch provides an interface to allow you to query collection or view from any database.

MongoDB Model

Database

Choose database to query from.

Collections/Views

Choose which collection/view you want to query from. For advanced use cases, like joining data across collections, or running aggregation pipeline, you can leverage views to pre-define the pipeline. For details on how to create a view, check MongoDB docs.

Once the view has been created, it will automatically show up in the dropdown.

Filter

You can apply a filter to filter document. Check MongoDB docs on how to use filter.

For example, to query all the documents with account_id 20, you can set a filter { "account_id": 20 }.

    Need help?

    Our team is relentlessly focused on your success. We're ready to jump on a call to help unblock you.

    • Connection issues with your data warehouse?
    • Confusing API responses from destination systems?
    • Unsupported destination objects or modes?
    • Help with complex SQL queries?

    Feature Requests?

    If you see something that's missing from our app, let us know and we'll work with you to build it!

    We want to hear your suggestions for new sources, destinations, and other features that would help you activate your data.

On this page

OverviewCreating MongoDB sourceConnection DetailsCreate MongoDB SourceCreate a model

Was this page helpful?