Join Mongo Document Metadata
The purposes of this task is to retrieve metadata from an outside mongo database during a migration, adding it to the repository document before mappings are performed.
This task is called a "join" because it checks for a value on both the Repository Document and in the Mongo Document.
-
The checked field on the Repository Document can be either a standard field mapping, or it can be calculated using the 3Sixty Expression Language.
-
If either checked field is missing, the process will be skipped.
-
If the values of the checked field matches, the comma delimited list of fields will be added from the Mongo Document, in lowercase.
-
They can then be added as normal field mappings in a job mapping, as Field mappings take place after Tasks.
-
This task supports multiple fields to check on the Mongo document and repository document
-
Users can sort the order in which the fields are checked
Configuration
To use this task go to the task tab in your job. Select the task from the drop down and click the plus circle to configure the task. Click done after making any changes to save.
Condition check
It will execute the task when the condition's result is 'true', 't', 'on', '1', or 'yes' (case-insensitive), or run on all conditions if left empty. This condition is evaluated for each document, determining whether the task should be executed based on the specified values.
Example: If I only want to run this task for PDF documents I would use the expression: equals('#{rd.mimetype}',"application/pdf")
Fill in the following fields to configure this task: Some fields come with default configurations. Update them as necessary.
Note: Query fields will only take single quotes
The fields you're checking for on the mongo document (comma separated)
-
Default: doc_id,doc_name
The fields you're checking for on the repository document
For example:
-
'#{rd.id}'
-
'#{rd.filename}'
Each line contains one field. The number of fields must match the ones you are checking on in the Mongo document.
Comma delimited list of fields to add to the repository documents, should the fields match
Mongo field to be used for sorting followed by a comma and sort order
-
docCreated:1
The Sort order can be +1 for ascending or -1 for descending.
The MongoDB Url
-
localhost
The Mongo Port
-
27017
The mongo database to query
-
admin
The mongo collection to query
-
collection
The mongo user, leave blank if no authentication is set
The mongo password, leave blank if no authentication is set
API Keys
Processor: mongoMetadataTask
Key |
Display Name |
Type |
---|---|---|
use_condition | Check a condition before executing this task. | Boolean |
task_condition |
Condition |
String |
task_stop_proc |
Stop Processing |
Boolean |
document_field |
The fields you're checking for on the mongo document (comma separated) |
String |
repo_field |
The fields you're checking for on the repository document |
String |
add_fields |
Comma delimited list of fields to add to the repository documents, should the fields match |
String |
sort_field |
Mongo field to be used for sorting followed bya comma and sort order |
String |
mongo_url |
The MongoDB Url |
String |
mongo_port |
The Mongo Port |
String |
mongo_database |
The mongo database to query |
String |
mongo_collection |
The mongo collection to query |
String |
mongo_user |
The mongo user, leave blank if no authentication is set |
String |
mongo_pass |
The mongo password, leave blank if no authentication is set |
String |