MongoDB Reader Parameters
Database Connection
This parameter must contain the hostname or IP address of the source MongoDB server.
This parameter determines the TCP port used to connect to the source MongoDB server.
If left blank, a default value of 27017 (the standard MongoDB port) will be used.
This parameter may be used to specify the database that contains the source collection(s) to be read.
- If a valid database name is given, then only collections from that database can be read. The name of the source feature type(s) will be the name of the source MongoDB collection(s).
- If no database name is given, then collections may be read from any database on the source MongoDB server. In that case, the source feature type name(s) will be in the form: <database_name>.<collection_name>.
Authentication
This parameter may be used to specify a username for authentication on the source MongoDB server.
If left blank, no authentication will be attempted.
This parameter may be used to specify a password for authentication on the source MongoDB server.
A password should only be specified if a username has been specified.
This parameter may be used to specify a database name for authentication on the source MongoDB server. The authentication database is the database that contains the user specified in the Username parameter.
If left blank, the value of the Database Name parameter will be used.
Constraints
After you have specified the database connection, click the Browse button to select collections for import. A connection window appears while the system compiles a table from the database.
Once the collection list appears, you can select one or more collections, and then click OK to dismiss the window. The collection name(s) will appear in the Collection List field in the parameter box.
Advanced
This parameter specifies the number of features to be retrieved from the server for each request.
If not specified, the default value is 2000.
The parameter controls whether the MongoDB reader outputs the unmodified JSON for each document in the source collection(s).
- Yes: The original JSON will be read into the mongodb_json format attribute on each source feature.
- No: The mongodb_json format attribute will not be read.
Schema Attributes
Use this parameter to expose Format Attributes in Workbench when you create a workspace:
- In a dynamic scenario, it means these attributes can be passed to the output dataset at runtime.
- In a non-dynamic scenario where you have multiple feature types, it is convenient to expose additional attributes using this one parameter. For example, if you have ten feature types and want to expose the same attribute in each one, it is easier to define it once than it is to set each feature type individually in the workspace.
Using the minimum and maximum x and y parameters, define a bounding box that will be used to filter the input features. Only features that intersect with the bounding box are returned.
If all four coordinates of the search envelope are specified as 0, the search envelope will be disabled.
Select this parameter to remove any portions of imported features being read that are outside the Search Envelope.
The illustration below shows the results of the Search Envelope when Clip to Search Envelope is set to No on the left side and Yes on the right side.
- No: Any features that cross the search envelope boundary will be read, including the portion that lies outside of the boundary.
- Yes: Any features that cross the search envelope boundary will be clipped at the boundary, and only the portion that lies inside the boundary will be read. The underlying function for the Clip to Search Envelope function is an intersection; however, when Clip to Search Envelope is set to Yes, a clipping operation is also performed in addition to the intersection.