MongoDB is optimized for flexible data modeling and scalability, making it a popular choice database choice. However, it was not specifically designed for analytics, which poses challenges when using MongoDB for analytical workloads. With Knowi, you can connect directly to your MongoDB or MongoDB Atlas instance, run advanced queries, join across multiple data sources, and build insightful dashboards—all within one unified platform.
Let’s walk through how you can get from raw MongoDB data to visual insights in just a few steps.
Step 1: Connect MongoDB as a Data Source
To begin, navigate to New Data Source.
Select MongoDB.
You’ll be prompted to enter your credentials to establish a live connection with your Mongo database. If you’re using MongoDB Atlas, that’s supported too!
Pro Tip: Enable the Writable Destination option if you want to push the results of your queries back into MongoDB.
Once your connection is configured, test it—and you’re ready to query.
Step 2: Query Your MongoDB Data Using the Builder
After connecting, you’re taken to the Query Builder.
Here, you can:
- Write native Mongo queries
- Join Mongo data with other sources (like MySQL)
- Apply transformations using drag-and-drop or custom code
Use the Quick Search to browse collections and nested fields.
Select fields and drop them into the Metric section, then head to the Editor tab to see your Mongo query automatically generated.
For example, let’s say we choose:
- campaign_name
- conversions
- And group by campaign_name
We can apply a sum operation to conversions, and preview the transformed output in real-time.
Already have Mongo queries? Just paste them into the editor—no need to start from scratch.
Optional: Add SQL-Like Transformations
Prefer writing SQL? Use Cloud9QL, Knowi’s transformation layer that lets you run SQL queries after your Mongo data is fetched.
Example:
SELECT SUM(conversions) AS conversions, campaign_name
GROUP BY campaign_name
This layered approach gives you the flexibility of SQL with the power of Mongo.
Step 3: Join MongoDB Data with Other Data Sources
Need more context from other systems? You can join Mongo data with external sources like MySQL.
Example:
You can pull data from the sending_activity collection in MongoDB and join it with a customer table in MySQL on the customer field.
- Select Join Datasource
- Select the new data source you want to join. In this case, My SQL Database.
- Select the kind of Join
You can then apply filters—like only showing results where currency is USD—using SQL or drag-and-drop.
Step 4: Choose Your Data Strategy
Once your query is ready, you’ll define how it behaves:
- Direct Query: Executes live on each load (with optional caching)
- Run Once: Executes on demand and stores the result in Knowi’s warehouse
- Custom Store: Saves the output back into MongoDB
- Scheduled Intervals: Run your query automatically on a schedule
You can also skip a query if a connected query is already running—useful for managing load.
Step 5: Build a Dashboard
Your query output is now a reusable dataset.
Go to Create Dashboard, name it (e.g., Customer Analytics), and drag in your dataset widget. From here, you can:
- Ask questions like Total Sales by Customer Weekly
- Transform and filter the data
- Choose a visualization type—like a Stacked Area Chart
In just minutes, you’ve gone from a raw MongoDB connection to a fully functional dashboard. Watch the full video tutorial here.
Knowi eliminates the complexity of working with MongoDB data by letting you query, transform, join, and visualize—all in one place. Whether you’re a data analyst, product manager, or engineer, Knowi helps you move from data to decisions faster than ever.
Ready to try it yourself? Start your free trial today.