MongoDB Output Tool

The MongoDB Output tool is used for writing data to MongoDB databases. MongoDB is a scalable, high-performance, open source NoSQL database. You can learn more about MongoDb here: http://www.mongodb.org/.

MongoDB databases store data in a BSON format which is binary JSON. You can learn more about BSON here: http://bsonspec.org/

Configuration Properties

  1. Server:The name of the MongoDB server you wish to connect to. Enter localhost to connect to a MongoDb instance you have on the machine running Alteryx.

  2. Database:The name of the MongoDB database you wish to connect to.

  3. Collection:The name of the MongoDB collection you wish to push data to.

  4. UserName/Password (optional):If your MongoDb instance is running with the –auth option this is where you enter the username/password you wish to connect to.

  5. Output Options:

  6. _id Field:Used to select the Alteryx field which contains the _id value when using “Update Using _id” mode. Note if you wish to update based on the MongoDb generated ID then this should be a JSON object e.g. { "_id" : { "$oid" : "4fad55603346998a9f7d6841" }}

  7. BSON view:The tree view at the bottom of the tool configuration provides a visual representation of what the BSON object will look like which is going to be inserted into your collection.

The default options uses the dot notation to build the structure of the BSON object so for example passing fields MemberID; Name.First; Name. Last would by default give you a JSON object which looked like this { MemberID: 123, Name : { First : “Alistair” , Last : “Terry” } }.

However you can restructure the BSON object to look however you would like by using the up/down/add/remove buttons.