Skip to content

Storage node library

The following listing shows the specific "storage" nodes and their respective functions:

Postgres node

Postgres node

This node allows reading and writing data from a Postgres database. You can set the database queries in the properties of the node. The node delivers the result of the query in msg.payload or in the configuration with optional query parameters in msg.queryParameters. The parameters in the query must be specified as $fieldName. You can find more information under node-postgres-named.

You use this node to: - Query data form a Postgres database.

Note

Restriction

  • At the moment you cannot connect Cloud Foundry Backing Services Instances with Visual Flow Creator.
  • You cannot access Cloud-Foundry based databases which belong to third party MindSphere services

Mongodb in node

Mongodb

This node allows reading data from a Mongodb database.

You can use the following operations:

  • find: Returns the contents of the database.
  • count: Returns a count of the number of documents in a collection.
  • aggregate: Provides access to the aggregation pipeline.

You can find more information on the Node-RED page in the Mongodb section.

Mongodb out node

Mongodb out

This node allows writing data into a Mongodb database.

You can use the following operations:

  • save: Will update an existing object or insert a new object if one does not already exist.
  • insert: Inserts a new object
  • update: Will modify an existing object or objects
  • remove: Removes objects that match the query passed in on msg.payload.

You can find more information on the Node-RED page in the Mongodb section.

SFTP node

SFTP

This node allows to read and write files from/to SFTP server.

You can use the following operations:

  • List Directory: It will list the directory content and returns an array of the found files.
  • Get: It will get a file from the SFTP server as Buffer object.
  • Put: It will create the defined directory on the SFTP server in the specified working directory.
  • Delete File: It will delete a file from the SFTP server as per the specified filename.
  • Make Directory: It will create a directory on the SFTP server as per the specified working directory.
  • Remove Directory: It will remove the defined directory and all sub-directories on the SFTP server in the specified working directory.

You can find more information on the Node-RED page in the SFTP section.

Example

To get the list of the directories from the SFTP server, follow these steps:

  1. Create the flow as shown below:

    Create the flow

  2. Edit sftp node and enter the details:

    Edit sftp node

  3. Save and execute the flow.

Result

The output is displayed in the message payload:

Output

Any questions left?

Ask the community


Except where otherwise noted, content on this site is licensed under the MindSphere Development License Agreement.


Last update: April 29, 2022