Strings functions in the Redis DuckDB extension
Function category
Strings
3 functionsGET / SET / MGET against Redis string keys. The simplest key-value layer — read and write opaque values.
Signature
redis_get(key: VARCHAR, secret_name: VARCHAR) → VARCHAR
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
key
|
Type
VARCHAR
|
Mode Positional | Description |
Argument
secret_name
|
Type
VARCHAR
|
Mode Positional | Description |
Description
Get the value of a string key.
1
Example 1
SELECT redis_get('mykey', 'my_redis_secret');
2
Example 2
SELECT redis_get(key_column, 'my_redis_secret') FROM my_table;
Signature
redis_mget(keys: VARCHAR, secret_name: VARCHAR) → VARCHAR
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
keys
|
Type
VARCHAR
|
Mode Positional | Description |
Argument
secret_name
|
Type
VARCHAR
|
Mode Positional | Description |
Description
Get multiple values in one round-trip. Keys are passed as a comma-separated string.
1
Example 1
SELECT redis_mget('key1,key2,key3', 'my_redis_secret');
Related functions
Signature
redis_set(
key: VARCHAR,
value: VARCHAR,
secret_name: VARCHAR
) → VARCHAR
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
key
|
Type
VARCHAR
|
Mode Positional | Description |
Argument
value
|
Type
VARCHAR
|
Mode Positional | Description |
Argument
secret_name
|
Type
VARCHAR
|
Mode Positional | Description |
Description
Set the value of a string key.
1
Example 1
SELECT redis_set('mykey', 'myvalue', 'my_redis_secret');