MongoDB

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

FieldField IDTypeNote
URI (required)uristringFill in your MongoDB URI

#Supported Tasks

#Insert

Perform an insert operation

InputIDTypeDescription
Task ID (required)taskstringTASK_INSERT
Database Name (required)database-namestringThe name of the database in MongoDB
Collection Name (required)collection-namestringThe name of the collection in MongoDB
IDidstringThe ID of the document
Data (required)dataobjectThe data to be inserted
OutputIDTypeDescription
StatusstatusstringInsert status

#Insert Many

Perform an insert many operation

InputIDTypeDescription
Task ID (required)taskstringTASK_INSERT_MANY
Database Name (required)database-namestringThe name of the database in MongoDB
Collection Name (required)collection-namestringThe name of the collection in MongoDB
Array IDarray-idarray[string]The array of id
Data (required)array-dataarray[object]The array data to be inserted
OutputIDTypeDescription
StatusstatusstringInsert many status

#Find

Perform a find operation

InputIDTypeDescription
Task ID (required)taskstringTASK_FIND
Database Name (required)database-namestringThe name of the database in MongoDB
Collection Name (required)collection-namestringThe name of the collection in MongoDB
IDidstringThe ID of the document
FilterfilterobjectThe 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
LimitlimitintegerThe number of documents to return. If empty then all documents will be returned
Fieldsfieldsarray[string]The fields to return in the documents. If empty then all fields will be returned
OutputIDTypeDescription
ResultresultobjectResult of the find operation
StatusstatusstringFind status

#Update

Perform an update operation

InputIDTypeDescription
Task ID (required)taskstringTASK_UPDATE
Database Name (required)database-namestringThe name of the database in MongoDB
Collection Name (required)collection-namestringThe name of the collection in MongoDB
IDidstringThe ID of the document
FilterfilterobjectThe 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-dataobjectThe updated data to be applied to the documents
OutputIDTypeDescription
StatusstatusstringUpdate status

#Delete

Perform a delete operation

InputIDTypeDescription
Task ID (required)taskstringTASK_DELETE
Database Name (required)database-namestringThe name of the database in MongoDB
Collection Name (required)collection-namestringThe name of the collection in MongoDB
IDidstringThe ID of the document
FilterfilterobjectThe 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
OutputIDTypeDescription
StatusstatusstringDelete status

#Drop Collection

Delete the collection

InputIDTypeDescription
Task ID (required)taskstringTASK_DROP_COLLECTION
Database Name (required)database-namestringThe name of the database in MongoDB
Collection Name (required)collection-namestringThe name of the collection in MongoDB
OutputIDTypeDescription
StatusstatusstringDelete collection status

#Drop Database

Delete the database

InputIDTypeDescription
Task ID (required)taskstringTASK_DROP_DATABASE
Database Name (required)database-namestringThe name of the database in MongoDB
OutputIDTypeDescription
StatusstatusstringDelete database status

#Create Search Index

Create a search index, only works for M10 or larger clusters

InputIDTypeDescription
Task ID (required)taskstringTASK_CREATE_SEARCH_INDEX
Database Name (required)database-namestringThe name of the database in MongoDB
Collection Name (required)collection-namestringThe name of the collection in MongoDB
Index Name (required)index-namestringThe name of the index to be created
Index Type (required)index-typestringThe type of the index to be created
Syntax (required)syntaxobjectThe syntax structure of the search index, please refer to the MongoDB documentation for more information. search https://www.mongodb.com/docs/atlas/atlas-search/create-index/. vectorSearch https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-type/
OutputIDTypeDescription
StatusstatusstringCreate index status

#Drop Search Index

Drop a search index, only works for M10 or larger clusters

InputIDTypeDescription
Task ID (required)taskstringTASK_DROP_SEARCH_INDEX
Database Name (required)database-namestringThe name of the database in MongoDB
Collection Name (required)collection-namestringThe name of the collection in MongoDB
Index Name (required)index-namestringThe name of the index to be dropped
OutputIDTypeDescription
StatusstatusstringDelete index status

Perform a vector search operation

InputIDTypeDescription
Task ID (required)taskstringTASK_VECTOR_SEARCH
Database Name (required)database-namestringThe name of the database in MongoDB
Collection Name (required)collection-namestringThe name of the collection in MongoDB
Index Name (required)index-namestringThe name of the index to be used for vector search
Query Vector (required)query-vectorarray[number]The query vector to be used for vector search
ExactexactbooleanThe exact value for vector search. If true, then ENN search will be performed, otherwise ANN search will be performed. Default to false
Limit (required)limitintegerLimit the documents to be returned
Number of Candidatesnum-candidatesintegerThe number of candidates to the field to be used for vector search. Default to 3 times limit
Path (required)pathstringThe path to the field to be used for vector search
FilterfilterobjectThe 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
Fieldsfieldsarray[string]The fields to return in the documents. If empty then all fields will be returned
OutputIDTypeDescription
ResultresultobjectResult of the vector search operation
StatusstatusstringVector search status