The MongoDB component is a data component that allows users to access the MongoDB NoSQL database.
It can carry out the following tasks:
#Release Stage
Alpha
#Configuration
The component configuration is defined and maintained here.
#Setup
Field | Field ID | Type | Note |
---|
URI (required) | uri | string | Fill in your MongoDB URI |
#Supported Tasks
#Insert
Perform an insert operation
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_INSERT |
Database Name (required) | database-name | string | The name of the database in MongoDB |
Collection Name (required) | collection-name | string | The name of the collection in MongoDB |
ID | id | string | The ID of the document |
Data (required) | data | object | The data to be inserted |
Output | ID | Type | Description |
---|
Status | status | string | Insert status |
#Insert Many
Perform an insert many operation
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_INSERT_MANY |
Database Name (required) | database-name | string | The name of the database in MongoDB |
Collection Name (required) | collection-name | string | The name of the collection in MongoDB |
Array ID | array-id | array[string] | The array of id |
Data (required) | array-data | array[object] | The array data to be inserted |
Output | ID | Type | Description |
---|
Status | status | string | Insert many status |
#Find
Perform a find operation
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_FIND |
Database Name (required) | database-name | string | The name of the database in MongoDB |
Collection Name (required) | collection-name | string | The name of the collection in MongoDB |
ID | id | string | The ID of the document |
Filter | filter | object | The filter to find documents, please refer to the documentations https://www.mongodb.com/docs/manual/reference/operator/query/. If empty then all documents will be returned |
Limit | limit | integer | The number of documents to return. If empty then all documents will be returned |
Fields | fields | array[string] | The fields to return in the documents. If empty then all fields will be returned |
Output | ID | Type | Description |
---|
Result | result | object | Result of the find operation |
Status | status | string | Find status |
#Update
Perform an update operation
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_UPDATE |
Database Name (required) | database-name | string | The name of the database in MongoDB |
Collection Name (required) | collection-name | string | The name of the collection in MongoDB |
ID | id | string | The ID of the document |
Filter | filter | object | The filter to update documents, please refer to the documentations https://www.mongodb.com/docs/manual/reference/operator/query/. If empty then all documents will be returned |
Update (required) | update-data | object | The updated data to be applied to the documents |
Output | ID | Type | Description |
---|
Status | status | string | Update status |
#Delete
Perform a delete operation
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_DELETE |
Database Name (required) | database-name | string | The name of the database in MongoDB |
Collection Name (required) | collection-name | string | The name of the collection in MongoDB |
ID | id | string | The ID of the document |
Filter | filter | object | The filter to delete documents, please refer to the documentations https://www.mongodb.com/docs/manual/reference/operator/query/. If empty then all documents will be returned |
Output | ID | Type | Description |
---|
Status | status | string | Delete status |
#Drop Collection
Delete the collection
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_DROP_COLLECTION |
Database Name (required) | database-name | string | The name of the database in MongoDB |
Collection Name (required) | collection-name | string | The name of the collection in MongoDB |
Output | ID | Type | Description |
---|
Status | status | string | Delete collection status |
#Drop Database
Delete the database
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_DROP_DATABASE |
Database Name (required) | database-name | string | The name of the database in MongoDB |
Output | ID | Type | Description |
---|
Status | status | string | Delete database status |
#Create Search Index
Create a search index, only works for M10 or larger clusters
Output | ID | Type | Description |
---|
Status | status | string | Create index status |
#Drop Search Index
Drop a search index, only works for M10 or larger clusters
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_DROP_SEARCH_INDEX |
Database Name (required) | database-name | string | The name of the database in MongoDB |
Collection Name (required) | collection-name | string | The name of the collection in MongoDB |
Index Name (required) | index-name | string | The name of the index to be dropped |
Output | ID | Type | Description |
---|
Status | status | string | Delete index status |
#Vector Search
Perform a vector search operation
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_VECTOR_SEARCH |
Database Name (required) | database-name | string | The name of the database in MongoDB |
Collection Name (required) | collection-name | string | The name of the collection in MongoDB |
Index Name (required) | index-name | string | The name of the index to be used for vector search |
Query Vector (required) | query-vector | array[number] | The query vector to be used for vector search |
Exact | exact | boolean | The exact value for vector search. If true, then ENN search will be performed, otherwise ANN search will be performed. Default to false |
Limit (required) | limit | integer | Limit the documents to be returned |
Number of Candidates | num-candidates | integer | The number of candidates to the field to be used for vector search. Default to 3 times limit |
Path (required) | path | string | The path to the field to be used for vector search |
Filter | filter | object | The filter to be used for vector search, need to first create filter vectorSearch search index, please refer to the documentations https://www.mongodb.com/docs/manual/reference/operator/query/. If empty then all documents will be returned to be used for vector search |
Fields | fields | array[string] | The fields to return in the documents. If empty then all fields will be returned |
Output | ID | Type | Description |
---|
Result | result | object | Result of the vector search operation |
Status | status | string | Vector search status |