MongoDB Input Tool Icon

MongoDB Input Tool

Version:
Current
Last modified: November 25, 2019

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.
  • 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.

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.
  • Delete icon Click to delete the selected row from the grid.
  • up icon down icon 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.

Was This Helpful?

Running into problems or issues with your Alteryx product? Visit the Alteryx Community or contact support.