--- title: "MongoPostexecuter" slug: "mongo-postexecutor" updated: 2026-08-18T12:25:07Z published: 2026-08-18T12:25:07Z canonical: "docs.lobstersoftware.com/mongo-postexecutor" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # MongoPostexecuter | **Class name** | com.ebd.hub.datawizard.postexec.MongoPostexecutor | | --- | --- | ## Description This postexecuter performs an operation on a MongoDB document. To do this, create the basic data in the target structure of the Profile and then run the [JsonCreationUnit](/v1/docs/en/json-creation-unit) in Phase 5 to create a JSON document. After that, the MongoPostexecutor has to be executed, which manages communication with the MongoDB and generates a BSON document from the JSON document. A MongoDB stores datasets as BSON documents. BSON is a binary representation of JSON documents but contains more data types than JSON. To create these types of data, MongoDB offers certain methods that you can specify instead of specific values in a document to be inserted. See parameter *Cast* and the example below. ## Parameters | Parameter | Description | | --- | --- | | MongoDB-Alias | The alias of the connected [MongoDB setup](/v1/docs/en/intro-external-systems-databases-mongodb). | | Collection | The collection. **NOTE:** A collection is a grouping of MongoDB documents and is roughly equivalent to a table in an SQL database. | | Operation | The operation to be executed. *Upsert* – Inserts a new document if not already present. Otherwise, the existing document is completely replaced. *Replace* – Replaces the existing document. If it does not exist, no change is made. *Update* – Only the specified/included fields of the document are replaced. *Insert* – Insert a new document. *Delete* – Delete document. *UpdateMany* – *Update of several documents.* *DeleteMany* – *Delete of several documents.* | | Filter | The filter used to define the documents to which the changes are to be applied, e.g. for *UpdateMany* and *DeleteMany*. **Example:** *{“status”: “old”}* If you want to refer to all documents, use *{}*. | | Cast | Since the JsonCreationUnit can only generate 'normal' JSON, it is not directly possible to create the syntactically correct method calls that can be used in the MongoDB. To make this possible, you can specify the names of the methods that the postexecuter recognizes in the JSON document generated by the *JsonCreationUnit* and then generates a syntactically correct MongoDB call. See example below. | **Example:** Assume the following target structure. ![images/download/attachments/201685182/140-version-1-modificationdate-1749627429272-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/140-version-1-modificationdate-1749627429272-api-v2.png) We enter the fixed value *ObjectId()* in field *_id*, the fixed value *Peter Hall* in field *Name* and in field *DateOfBirth* we use the following Function chain. | now() create W3CDTF from date (a) for Target Timezone (b) a Result: 1 b Value: UTC concat(a,b,c,d,e,f,g,h, [CR-support i]) a Value: ISODate( b Result: 2 c Value: ) d Value: e Value: f Value: g Value: h Value: i Value: | | --- | In Phase 5 we use the JsonCreationUnit with value *MyData* for parameter *Start at node* to create the temporary JSON document. Afterwards, also in phase 5, we execute the MongoPostexecutor with the following properties configuration file. ```sample MongoDB-Alias=mongodb Operation=Upsert Collection=demo Cast=ISODate,ObjectId ``` Here is the original document created by JsonCreationUnit. ```plaintext {"_id":"ObjectId()","Name":"Peter Hall", "DateOfBirth":"ISODate(2019-01-30T07:59:05Z)"} ``` Following is the document actually inserted by the postexecuter. ```plaintext {"_id":ObjectId("5c52a06c0bafb86b5e46ffec"),"Name":"Peter Hall", "DateOfBirth":ISODate("2019-01-30T07:59:05Z")} ``` So you create a method call as a normal string in a field of the target structure. The JsonCreationUnit will then set the double quotes around it and the postexecuter will remove them and put them around the argument value of the method instead. A profile is the central configuration unit in the Lobster Data Platform. It receives data, processes it, and forwards it. Configuration is done graphically, with no programming required. Integration Units: Optional downstream transformations, such as conversion to XML format. JSON (**J**ava**S**cript **O**bject **N**otation) is a lightweight text format for data exchange. The Lobster Data Platform handles JSON in integration profiles, web resources, and API interfaces. Value resolvers convert JSON data to internal objects and vice versa. Function chains in Lobster consist of sequences of functions that are used to define conditions or to process data. The possibility of encapsulating them in macros and reusing them allows for central maintenance and compact use. Changes to a macro affect all profiles with that macro. Function chains can be determined both system-wide and client-specific.