Redis

UI Bakery allows you to easily connect to a Redis database with no need for additional layers like APIs or third-party services.

Configuration

Prerequisites

If your database is hosted behind a Firewall, you need to add our IP addresses to the Firewall whitelist.

Connecting the data source

  1. On the Data sources page, click Connect, and select Redis in the Data sources list.

  2. Specify the required credentials:

    1. Host

    2. Port

    3. Password (if your Redis instance is in the protected mode)

    4. Database number

  3. Click Test connection to check whether the connection can be established, and then click Connect Datasource to complete the setup.

Usage

Once you have established the connection between UI Bakery and Redis, you can manage its data. UI Bakery allows executing most of the Redis Commands. A command should be sent as an array where the first element is a string representing Redis Command type, and the other elements of an array are command arguments, for example:

['GET', 'key']
  • It is also possible to send multiple commands at once as an array of arrays:

[ ['GET', 'key1'], ['GET', 'key2'] ]
  • UI Bakery also converts all input non-string command arguments to strings except for the undefined and null values - they are converted to empty strings. For example, if you execute ['SET', 'number', 42] followed by ['GET', 'number'], the result string will be "42". If you want to convert the value back to a number, you should use Number({{data}}) in the result mapper.

For more Redis Command examples, check out this page.

Last updated

Was this helpful?