MongoDB Input Tool
Warning
The MongoDB Input tool is deprecated. You can still use the Input Data tool with the ODBC driver linked on the MongoDB datasource page to connect to MongoDB.
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.
Tool Configuration
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.
Automatic Configuration
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:
Criteria: Enter the criteria portion of the MongoDB find command to filter returned documents.
The criteria must be specified between opening and closing curly brackets. {"Email": "name@domain.com"}
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/
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.
Note
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.
Include Mongo _id Field: Select to return the _id field from the MongoDB Collection as the last column of the table.
Manual Configuration
Specify the schema or specify a select amount of documents to determine the schema.
Under Properties, populate the table schema using the following techniques:
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.
Record Limit: The ability to limit the documents read from the input data source. Left blank, all documents will be read.
Tool Limitations
The MongoDB Input tool does not support connecting to SSL or TLS enabled MongoDB instances or clusters.
You can't enter a MongoDB Connection string to connect to a MongoDB. When connecting to a replica set or sharded cluster, enter the primary node host.
The MongoDB Input tool doesn't support the use of an authentication database. You must be able to authenticate directly to the same database from which you want to pull data.