Datastore PG

A configurable key-value datastore with support for in-memory and PostgreSQL storage.

Get

AI-generated

Overview

This node acts as a configurable key-value datastore that supports retrieving data from either an in-memory store or a PostgreSQL database. It is useful for scenarios where you need to fetch stored data by a unique key, such as caching values, session data retrieval, or configuration management within workflows.

Use Case Examples

  1. Retrieve a user session object stored under a specific key from PostgreSQL.
  2. Fetch cached API response data stored in memory for quick access.

Properties

Name Meaning
Storage Backend Choose where to store the data, either in-memory (temporary) or PostgreSQL (persistent).
Key Name The unique key for the data to retrieve.

Output

JSON

  • key - The key name used to retrieve the data.
  • value - The value associated with the key, can be any data type including arrays or objects.
  • found - Boolean indicating whether the key was found in the datastore.

Dependencies

  • Requires a PostgreSQL credential if using the PostgreSQL storage backend.

Troubleshooting

  • Error if 'Key Name' is not provided for the 'Get' operation.
  • If the key does not exist, the output will indicate 'found' as false with a null value.
  • Ensure PostgreSQL credentials are correctly configured when using the PostgreSQL backend to avoid connection errors.

Discussion