Delete Documents
Description
This step deletes one or more documents from a MongoDB collection based on a filter query. You provide the collection name and the filter criteria in JSON format. Use this step in workflows that clean up old records, remove processed data, or delete documents based on business rules.
Configurations
| No. | Field Name | Description |
|---|---|---|
| Configuration | ||
| 1 | Step Name | Name of the step. This name has to be unique in a single workflow. |
| Connection | ||
| 2 | Deployment Type | Deployment Type differentiates between on cloud or on premise instances. Select the type of deployment you require. Available values: On-Cloud or On-Premise. The data type is String. This field is mandatory. |
| 3 | MongoDB Conn ection String | Specify the MongoDB connection. Note: Specifying the connection disables other connection parameters, else the parameters stay enabled. The data type is string and the field is mandatory. |
| 4 | Host Name | Specify the host name based on the type of deployment you selected. Therefore, if deployment type is On-Cloud specify the cluster name and for On-Premise specify the IP address of the machine. The data type is String. This field is mandatory. |
| 5 | Port | Specify the port number of the MongoDB instance. The default value is 27017. Note: Port number is mandatory for Deployment Type: On-Premise. |
| 6 | Username | Specify a username to access the database. The data type is String. This field is mandatory. |
| Password | ||
| 7 | Password | Specify the password for the username. If the checkbox Accept Value as variable/static is selected, then the password field appears as a text box and accepts static or variable values. OR If the checkbox Accept Value as variable/static is not selected, then the password field appears as a dropdown in which you can select a field from the previous steps. The data type is String. This field is mandatory. |
| 8 | Test Connection | Verifies whether the connection is available or not. For the purpose of verification fields coming from previous steps are not allowed. Static values and environment variables are allowed. |
| Settings Tab: | ||
| Input Fields: | ||
| 1 | Ignore SSL Certificate Verification? | Select the Ignore SSL Certificate Verification? to ignore SSL certificate verification while making an HTTPS connection. Note: The field ignores certification checking which makes connection insecure and used only when required. The field is mandatory. |
| 2 | Trust Store File | Specify the file location of the local machine where the SSL/TLS certificate is saved. The added certificate ensures the connection with MongoDB client trusts the server and should be verified by SSL/TLS certificate. Note: Trust store file ensures that the MongoDB client trusts the server it is connecting to by verifying the server's SSL/TLS certificate. Allowed file extension: .jks or .p12 OR Click Browse to select the trust store file from the local machine. |
| 3 | Trust Store Password | Specify the trust store password to access the trust store file. The password protects the trust store and ensures that only authorized users can load and verify their certificates. Note: - If the checkbox Accept Value as variable/static is selected, then the password field appears as a text box and accepts static or variable values. OR - If the checkbox Accept Value as variable/static is not selected, then the password field appears as a drop-down in which you can select a field from the previous steps. |
| Input Tab | ||
| Input Fields | ||
| 1 | Database Name | Select a database name to delete records. The data type is String. This field is mandatory. |
| 2 | Get | On click of this button, if connection is successfully established, it populates a list of database names on MongoDB Server. Note: If a database other than Admin, Config, and Local is not available, the error message Database does not exist will be shown. |
| 3 | Collection Name | Select the table name to delete records. The data type is String. This field is mandatory. |
| 4 | Get | On click of this button, if connection is successfully established, it populate a list of collections for the specified database. Note: If a database other than Admin, Config, and Local is not available, the error message Database does not exist will be shown. |
| 5 | Criteria Query | Specify a combination of static values or variables and the previous step. The Criteria Query expression uses MongoDB’s JSON-like query language with query operators to perform query operations. Note: Query must be same as MongoDB Compass. |
| Output Tab | ||
| 1 | Deleted Count | Specify an output field to hold the Deleted Count of records upon successful plugin execution. Default value: DeletedCount |