* [docs]harperdb nosql * [docs]new operations in dynamodb * [docs] minor changes in dynamodb * [docs]redis revamp with encode-decode * [docs]azure blob gds * [docs]graphql authentication type udpate * [docs]added v2.12.0 * minor fix in how to use inspector * minor fix in pdf&filepicker
1.8 KiB
| id | title |
|---|---|
| redis | Redis |
Redis
ToolJet can run Redis commands on your Redis instances.
Connection
ToolJet requires the following to connect to your Redis instances.
- Host
- Port - The default port for Redis server is 6379
- Username
- Password
Click on "Test" button to test the connection and click "Save" to save the data source.
Redis Queries
Here are some examples of Redis commands and their usage. You can refer to the Redis Official Documentation for a complete list of supported commands.
PING Command
The PING command is used to test the connection to Redis. If the connection is successful, the Redis server will respond with PONG.
PING
SET Command
The SET command is used in Redis to assign a value to a specific key.
SET key value
Example 1/2: When the input value contains spaces, you should encode the value before providing it as an input:
SET products {{encodeURI('John Doe')}}
GET Command
The GET command is used in Redis to retrieve the value associated with a specific key.
GET key
Example 2/2: To retrieve a value that was previously encoded while setting, you can use transformations.
-
Enter the GET command in the editor:
GET products -
Enable Transformations (JS) and use
decodeURI:return JSON.parse(decodeURI(data));