Simple storage
The Simple storage component lets you store and retrieve key:value
pairs from a MongoDB database.
Purpose
The main goal of this component is to provide simple storage and retrieval of key:value
pairs.
Credentials
- hostname
-
Hostname or IP address of MongoDB server.
- port
-
The port used by your MongoDB server to accept connections. (Default is 27017)
- db
-
Database name used to store collections with
key:values
. - user
-
MongoDB username with access to read and write from/to corresponding DB and collection.
- pass
-
The password for a specified user.
Triggers
This component has no trigger functions. This means it will not be accessible to select as a first component during the integration flow design.
Actions
Store key
Inserts new or updates an existing key:value
pair.
Input fields
- keyName
-
The name of a field where the key will be stored.
- key
-
The value of a key that uniquely identifies the
key:value
pair. - valueName
-
Name of a field where value will be stored.
- value
-
The value that will be stored and can be accessed with provided keyName and key.
If the Update if exists? checkbox is selected, then the value would be updated if it already exists.
The resulting document is stored in MongoDb with the following structure:
Scenario | Source | Result |
---|---|---|
There is no such existing keyName:key: |
|
The entry is inserted. |
Another valueName is stored with the same |
|
The new value is added to the document. |
The |
|
The valueName is added to the existing |
The |
|
The value is updated. |
The |
|
No action is taken. |
Store key batch
This action will insert a new or replace an existing key:value
pair from Batch.
Input fields:
- keyName
-
Name of a field where the key will be stored.
- valueName
-
Name of a field where value will be stored.
- keyValArray
-
Array with values.
Each value in the array is an object which has the following fields:
- keyValue
-
The value of a key that uniquely identifies the
key:value
pair. - value
-
The value that will be stored and can be accessed with provided keyName.
Request example:
{
keyName: "someKeyName",
valueName: "someValueName",
keyValArray: [
{
keyValue : "someKeyValue1",
value: "someValue1"
},
{
keyValue : "someKeyValue2",
value: "someValue2"
}
]
}
All provided key:value
pairs will be inserted.
If a key already exists, it will be replaced.
Response:
{
"response": "done"
}