Read a MongoDB collection. The collection does not have to be a known data source to GlareDB.


read_mongodb(<connection_str>, <database>, <collection>)
Field Description
connection_str A MongoDB connection string.
database The name of the database.
collection The name of the collection.


In the following example, a ‘users’ collection is queryed.

select * from read_mongodb(
  'protocol=mongodb+srv, user=mongo_user, password=mong_user_password',

Refer to the documentation on MongoDB data sources for more information.