MongoDB Input Tool
The MongoDB Input tool is used to read data stored in MongoDB databases. MongoDB is a scalable, high-performance, open source, NoSQL database. Learn more about MongoDb.
MongoDB databases store data in a binary JSON format called BSON. Learn more about BSON.
Configure the tool
- Server:The name of the MongoDB server. Enter localhost to connect to a MongoDb instance you have on the machine running Alteryx.
- User Name and Password (optional):If your MongoDb instance is running with the –auth option, enter the username/password you wish to connect to.
- Save Connection History: Select to store the Server, User Name, and Password entered.
- Database: The name of the MongoDB database.
- Collection: The name of the MongoDB collection.
- Mode: There are 2 modes for reading the MongoDB. Depending on the mode chosen, additional configuration is necessary.
- Criteria: Enter the criteria portion of the MongoDB find command to filter returned documents.
- Depth: Specify how deep the JSON is parsed.
- Leave blank to parse at each level. Displays [ unlimited ].
- 0: Returns a column titled JSON containing all of the JSON.
- 1: Returns JSON parsed at the first level.
- Include Mongo _id Field: Select to return the _id field from the MongoDB Collection as the last column of the table.
- Scan: Scan the specified documents at the specified depth to determine and return the table schema.
- Manually enter the information to populate the grid:
- Element: Type column names.
- Type: Select the field type for each column.
- Size:Type a field size for each column.
- Criteria: Type a BSON query to set additional criteria for each column.
- Clear: Click to remove all data from the grid.
- Click to delete the selected row from the grid.
- Click the arrows to reorder the selected within the grid.
- Record Limit: The ability to limit the documents read from the input data source. Left blank, all documents will be read.
Designer reads the data in 2 passes: the first pass scans to determine the table schema, including columns, data type, and size. The second pass returns the data.
Additional properties when Automatic Mode is chosen:
The criteria must be specified between opening and closing curly brackets.
{"DateAdded": {$gt: {$date: "2014-01-12T20:15:31A"}}}
For more details on how to write filtering criteria for the MongoDB find command, see http://docs.mongodb.org/manual/reference/method/db.collection.find/
JSON containing DateTime
If a document at the selected depth is an array, it is converted to valid JSON. If an element below the selected depth contains a DateTime field, it is displayed as Epoch time.
Specify the schema or specify a select amount of documents to determine the schema.
Under Properties, populate the table schema using the following techniques: