How do I connect Klipfolio and MongoDB?

You can set up a connection between Klipfolio and MongoDB to display data from your database on a dashboard.

This article includes:

How do I connect to MongoDB data in Klipfolio?

Important: Before connecting Klipfolio with MongoDB, ensure the IP addresses listed here have been whitelisted.

To connect to MongoDB data in Klipfolio, you will need to provide your Host name, Database Name and a Collection Name. You can get this information from the administrator of your organization. 

Before entering Query Parameters on the Configuring Data Source page, you will need to select a Collection Method. See below for more information on the Find and Aggregate options:

Query parameters for Find:

In the Query Parameters text box, enter the query and/or projection parameters in valid JSON/BSON format.

For example: [{id : {$eq : 1}}, {name : 1}]

If you enter {} in the Query Parameters text box, all documents in the collection will be returned.

Learn more about the Find collection.

Query parameters for Aggregate:

In the Query Parameters text box, enter the pipeline parameter in JSON/BSON format.

For example: [{$project : {id:1, fname:1}},{$group: {id: dept, total: {$sum: $amount}}}, {$sort: {id: -1}}]

Learn more about the Aggregate collection.

 

To connect to and query a MongoDB data source:

  1. Navigate to the Service Connectors page in Klipfolio and choose MongoDB from the list.
  2. On the Configure Data Source page, enter the following:
    • At Host, enter your Host name.
    • At Port, use the default port number provided by Klipfolio.
    • At Authentication, optionally select Connect with username and password. Make sure you also enter the correct authentication database name where the role of your username and password exists.
    • At Database Name, enter your provided Database Name.
    • At Collection Name, enter your provided Collection Name
    • At Collection Method, select either Find or Aggregate. See more information above.
    • At Query Parameters, enter your Query Parameters based on your chosen Collection Method.
  3. Click Execute Query.

If you want to edit a data source that you already created, check out How to edit or reconfigure a data source, and get step-by-step instructions. 

How do I create a MongoDB custom Klip?

You create custom Klips from either your list of Klips or your Dashboard. You choose a data visualization format, for example, a pie chart, gauge, or table, and decide whether you want to use an existing data source or create a new one. In the Klip Editor, there are limitless opportunities to modify, relate, and display your data. See the following related articles for more information and get building!

Related Articles