PhloemDocs
Markdown
Integration

MongoDB

NoSQL document database

Category
Databases
Runs in
The Phloem cloud — nothing to install

Lets you and Hamming read documents from a MongoDB database, with each collection's fields listed in Trace.

What Phloem reads

  • The database's collections, with field names and types taken from the first 100 documents of each, listed in Trace
  • Collections named system.* are left out

Phloem only reads. It never writes to MongoDB.

What you need

  • The server's host, port (default 27017) and database, or a full connection string such as mongodb+srv://…
  • A user that can read the database, unless the server has no authentication
  • Network access from Phloem's cloud to the server

Connect

  1. In the console, open Connectors, choose Add connector, then MongoDB.
  2. Enter a Display Name.
  3. Under Authentication Method, choose:
    • Username & Password — Host, Port, Database, Username and Password. Auth Source is the authentication database (default admin). Set Replica Set if you connect to one.
    • Connection String — paste the full URI.
  4. Choose Test Connection (it shows the server version), then Create Connection.

What Hamming can do

  • Run find queries with JSON that you or Hamming write: {"collection": "users", "filter": {"age": {"$gt": 25}}, "limit": 100}, with an optional projection

Notes

  • A query returns 100 documents unless it sets limit.
  • Aggregation pipelines are not supported. Queries are find with a filter.

#Connection fields

What the Add connector form asks for.

FieldTypeRequired
Host
localhost
Text—
Port
27017
Number—
Database
mydb
Text—
UsernameText—
PasswordSecret—
Auth Source
Authentication database
admin
Text—
Replica Set
Replica set name (optional)
Text—
Connection String
Full MongoDB connection URI
mongodb+srv://user:pass@cluster.mongodb.net/db
Text—

Updated