Name
|
No
|
The name of the activity displayed in the process. The default value is
MapReduce.
|
MongoDB Connection
|
Yes
|
Select a shared resource by completing the following steps:
- Click the
Choose/Create Default Resource
icon to open the
Select MongodbconnectionResource Resource Template
window, where all the available resources are listed.
- In the Matching items panel, select one shared resource by clicking it. Click OK.
|
Collection Name
|
Yes
|
Specify the name for the collection where map and reduce operations are performed.
Note: Adhere to the following rules when specifying the collection name:
- Do not start the collection name with
system.
- Do not contain empty strings, and characters such as
$.
|
Read Preference
|
Yes
|
Select the read preference when the plug-in reads documents from a collection. Select one from the following list:
- PRIMARY
Reads from the primary member of a replica set.
- PRIMARY_PREFERRED
Reads from the primary member preferentially, but if the primary member is unavailable, reads from secondary members of a replica set.
- SECONDARY
Reads from secondary members of a replica set.
- SECONDARY_PREFERRED
Reads from secondary members preferentially, but if no secondary members are available, reads from the primary member of a replica set.
- NEAREST
Reads from a member of a replica set with the least network latency, irrespective of the member type of the replica set.
|
Map Function
|
No
|
Enter your JavaScript in the
Map Function field.
Note: The map function maps an operation in every document in a collection. This operation emits key and value pairs.
|
Reduce Function
|
No
|
Enter your JavaScript in the
Reduce Function field.
Note: The reduce function reduces all values of a specific key to one element which contains the result.
|
Finalize Function
|
No
|
Enter your JavaScript in the
Finalize Function field.
Note: The finalize function follows the reduce function and is used to modify the output result.
|