Configuring Insert Document Service
An Insert Document service inserts new document into database collections. You configure Adapter services using
Designer. For more information about adapter services, see
Adapter Services.
Refer the section
Before Configuring or Managing Adapter
Services before you configure adapters services.
To configure Insert service
1. In Designer, right-click the package which contains the service and select New > Adapter Service.
2. Select the parent namespace, type a name for the adapter service, and click Next .
3. Select Adapter for MongoDB as the adapter type and click Next.
4. Select the appropriate Adapter Connection Name and click Next.
5. From the list of available templates, select the Insert Document template and click Finish.
The adapter service editor for the adapter service appears. You can select the Adapter Settings tab at any time to confirm adapter service properties such as the Adapter Name, Adapter Connection Name , and Adapter Service Template .
6. Use the Collection tab to configure the collections which the operation accesses:
Field | Description/Action |
Database | Displays the database name that you provide in the Connections. |
Collection | Lists the collection present in the Database. |
Sampling Limit | Specify the number of sampling documents to be scanned to get the Document Fields. |
Acknowledgment | Requests the acknowledgment that the Write operation propagates to a specified number of mongod instances. |
Journal | Select this option to request the Acknowledgment that the mongod instances writes to the on-disk journal. |
TimeOut | Specify a time limit to avoid the Write operations from blocking indefinitely. |
Bypass Document Validation | Select this option to enable the insert operation to bypass document validation. |
7. Select the Insert tab to define the fields to be selected as follows:
a. Use the icon to create new rows as needed. You can use the icon to fill in all rows to the table. Field | Description/Action |
Document Fields | Name of the fields from sampling documents that you want to use. |
Field Type | Specifies the MongoDB data type for Document Fields. |
Input Field | Provide a value for query input during the design time or runtime. |
Input Field Type | Specifies the Java data type. |
b. You can also use or icons to change the order of the fields or documents to ensure the parameters are parsed in the correct order. c. Repeat this procedure until you have specified all the parameters.
8. From the File menu, select Save.