EXTERNAL_REDIS
All functions > SOURCE > EXTERNAL_REDIS
Returns the value of the given key and field (optionally) from the given Redis source
Signatures
Returns: Value from Redis key or hash field
EXTERNAL_REDIS(source: REDISSOURCE, key: VARCHAR, [field: VARCHAR]) → VARCHAR sql
| Parameter | Type | Required | Description |
|---|---|---|---|
source | REDISSOURCE | Yes | REDISSOURCE connection from SOURCE_REDIS |
key | VARCHAR | Yes | Redis key to fetch |
field | VARCHAR | No | Optional field name for Redis Hash lookups |
Notes
- Fetches value from Redis with low latency
- Supports Redis Strings (key only) and Hashes (key + field)
- For Strings: EXTERNAL_REDIS(source, key)
- For Hashes: EXTERNAL_REDIS(source, key, field)
- Returns VARCHAR - parse/cast as needed
- Online-only restriction (for real-time serving)
- Complements EXTERNAL_VIEW for key-value lookups
On this page