MongoDB (Input Agent Cron)
Introduction: You can find a description of this phase in section Phase 1 (Introduction).
Note: The MongoDBConnectionService must be activated on the Integration Server to use this Input Agent.
Note: The document type is automatically set to JSON when you use this Input Agent.
(1) Alias for the connection to the database. A database alias stands for a configured connection to a database system (see section MongoDBConnectionService). In addition, all variables with prefix MSG_CALL_ defined in the profile are available for selection. This makes it possible to pass the alias from a triggering profile or with an HTTP call. Note: For easy testability, the variables should be defined with a default value.
(2) The database to which the query refers (similar to a schema in an SQL database). Note: Although a database is already specified in the alias using parameter catalogName, you can overwrite the value for this connection here in the Input Agent.
(3) The collection to which the query refers (similar to a table in an SQL database).
(4) A MongoDB stores datasets as BSON documents. BSON is a binary representation of JSON documents but contains more data types than JSON. If you select BSON, BSON-specific data types are displayed in the returned JSON document. See section below. Note: See also the MongoPostexecuter on this topic.
(5) If a query returns more than the number of documents specified here, only the specified number of documents is read in (here 20), all others are ignored. If the query returns 22 documents, document 21 and 22 will be ignored. However, this does not generate an error.
(6) If this checkbox is set, all documents found by the query are combined into a single JSON document and only one job is started. If the checkbox is not set, then each document found by the query is returned individually and a separate job is started for each document.
(7) The query to be executed. The query language is not discussed here, please see the manufacturer's documentation.
(8) Executes the query (7) as a test. Note: Only the first result dataset is displayed in the test.
(9) Creates a source structure that fits the query. Attention: An already existing source structure is overwritten!
Output Format BSON and JSON
See item (4). The following is an arbitrary example document to illustrate the differences between the two output formats.
JSON
[{
"_id": "5ea94c0cfcba7e213485e8a4",
"JOB": 0,
"PROFILE": "httpin",
"PROFILE_ID": "6f6fbe3d:171c4d6b593:-7f28.d19731995bc0c589:6f6fbe3d:171c4d6b593:-8000",
"START": "2020-04-29T11:42:36.930Z",
"END": "2020-04-29T11:42:36.944Z",
"FAILED": false,
"FILENAME": "n.a.",
"BACKUP": "Job_0",
"CLIENT": "-1",
"ROLE": "",
"DISPLAY1": "",
"DISPLAY2": "",
"DISPLAY3": "",
"LOGPOOL": "STANDARD"
}]
BSON
[{
"_id": {
"$oid": "5ea94c0cfcba7e213485e8a4"
},
"JOB": {
"$numberLong": "0"
},
"PROFILE": "httpin",
"PROFILE_ID": "6f6fbe3d:171c4d6b593:-7f28.d19731995bc0c589:6f6fbe3d:171c4d6b593:-8000",
"START": {
"$date": {
"$numberLong": "1588153356930"
}
},
"END": {
"$date": {
"$numberLong": "1588153356944"
}
},
"FAILED": false,
"FILENAME": "n.a.",
"BACKUP": "Job_0",
"CLIENT": "-1",
"ROLE": "",
"DISPLAY1": "",
"DISPLAY2": "",
"DISPLAY3": "",
"LOGPOOL": "STANDARD"
}]
SQL on MongoDB
It is possible to execute SQL queries on a MongoDB in the Input Agent of type DB. See section MongoDB Setup .