Skip to main content

Create Document

Description

MongoDB: Create Document plugin step creates or inserts records in a specified collection.

Configurations

No.Field NameDescription
Configuration
1Step NameName of the step. This name has to be unique in a single workflow.
Connection
2Deployment TypeDeployment 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.
3Host NameSpecify 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.
4PortSpecify the port number of the MongoDB instance.
The default value is 27017.
Note: Port number is mandatory for Deployment Type: On-Premise.
5UsernameSpecify a username to access the database.
The data type is String. This field is mandatory.
Password:
6Accept Values from fieldsLeave checkbox unchecked to accept Password value from a field in the previous steps of the stream using a drop down list.
Else enable checkbox for Password field to appear as Text box.
7PasswordSpecify the password for the username.
If checkbox above is enabled Password field appears as Text box and accepts static values or variables. Else if checkbox above is disabled Password field appears as a drop down to select fields from previous steps.
The data type is String. This field is mandatory.
8Button: Test ConnectionVerifies 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.
Input Fields
1Database NameSelect a database name to retrieve records.
The data type is String. This field is mandatory.
2GetOn click of this button, if connection is successfully established, it populates a list of database names on MongoDB Server.
3Collection NameSelect the table name to retrieve records.
The data type is String. This field is mandatory.
4GetOn click of this button, if connection is successfully established, it populate a list of collections for the specified database.
5Accept fields as JSONLeave checkbox unchecked to accept JSON value from a field in the previous steps of the stream using a drop down list.
Else enable checkbox for JSON field to appear as a Text box.
6JSONSelect a field name from the drop-down list or provide a variable; containing the JSON text. Provide JSON in a valid format with field records for insertion.
The field data type is String.
Sample JSON: {"name":"Ross","status":"2"}
Table Fields:Provide a JSON with records to insert or else select fields with corresponding values to insert in the tabular columns below.
7Field NameDouble click to populate, fields associated with the form name.
The data type is string. This field is mandatory.
Note: For multilevel or nested JSON, use the JSON field.
8Field ValueSpecify valid values for the field associated with the field name.
9Field DatatypeSpecify a valid datatype from the provided list of field name and field value.
Available data types: String, Int32, Int64, ObjectID, Double, Boolean, Null, Decimal128, and Date.
Output Tab:
1Document IDSpecify an output field to hold the Document ID generated as a result of successful plugin execution.
Default value: DocumentID