Skip to main content Skip to complementary content

MongoDB properties

Properties to configure to connect to a MongoDB database table.

MongoDB connection

Select MongoDB in the list and configure the connection.

Configuration

Select your engine from the list and set the main and advanced settings.

Main settings
Property Configuration
Address type Select the address type in the list:
  • Select Standalone to define the standalone MongoDB database server you want to connect
  • Select Replica set to define a set of multiple MongoDB database servers you want to connect
Host and Port Enter the IP address and listening port of the database server.

If you have selected the Replica set option, you have the possibility to add multiple addresses.

Database Enter the name of the MongoDB database.
Authentication Toggle the Need auth option ON to enable the database authentication:
  • Among the mechanisms listed on the Auth mechanism drop-down list, select either Negotiate, which is recommended because it automatically select the most adapted authentication mechanism, or SCRAM-SHA-1 SASL, or SCRAM-SHA-256.
  • Toggle the Use auth database option ON to enter the name of the authentication database in which the username to be used to connect to MongoDB has been created.
  • Username and Password: enter the database user authentication data.
Advanced settings
Property Configuration
Connection parameter Add your custom MongoDB connection parameters if needed.

After configuring the connection, give it a display name (mandatory) and a description (optional).

MongoDB dataset

Dataset configuration
Property Configuration
Dataset name Enter a display name for the dataset. This name will be used as a unique identifier of the dataset in all Talend Cloud apps.
Connection Select your connection in the list. If you are creating a dataset based on an existing connection, this field is read-only.
Type Select the way you want to retrieve the data from your MongoDB database collection: either by naming the collection or by querying it.
MongoDB collection dataset/query dataset settings
Property Configuration
Collection Enter the name of the collection in the MongoDB database.
Mode Select the data format in the list.
Query

Specify the query condition. This field is available only when you have selected Collection query from the Type list.

For example, type in "{id:4}" to retrieve the record whose id is 4 from the database collection.

Additional JDBC parameters might be displayed depending on whether the connector is used as a source or destination dataset, read the JDBC parameters section to know more about these parameters.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!