FEATURE.GET
FEATURE.GET group entity [feature ...]
- Group
- Feature store
- Complexity
- O(F) where F is the number of features returned
- Arity
- -3 (at least 3 words, counting the command name)
- Flags
- read-only, fast
- Keys
- first 1, last 1, step 1
- HotKV Cloud
- Performance and Scale
- On-Premise
- requires the feature-store license feature
The feature store keeps typed feature values for entities (users, items, sessions) in named feature groups, for low-latency reads at model inference time. FEATURE.GET returns the features of entity: all of them in
schema order, or only the ones you name, in the order you name them. Names
that are not in the schema are skipped.
Return value
Section titled “Return value”| Case | RESP2 | RESP3 |
|---|---|---|
| Entity found | Array of three elements: an array of alternating feature names and values, the last update time in Unix milliseconds (integer), and the age of the data in milliseconds (integer) | Same |
| No such entity or group | Nil bulk string | Null |
Values come back as integers for int64 features, as decimal strings with six digits after the point for double features, and as bulk strings for string features.
Errors:
ERR wrong number of arguments for 'feature.get' commandif the argument count is wrong.NOLICENSE feature-store requires a HotKV license. Contact sales@hotkv.comif your license does not include thefeature-storefeature.
Examples
Section titled “Examples”127.0.0.1:6379> FEATURE.GET user_features user:421) 1) "age" 2) (integer) 31 3) "ctr" 4) "0.051000" 5) "country" 6) "DE"2) (integer) 17909856001233) (integer) 5012127.0.0.1:6379> FEATURE.GET user_features user:42 ctr1) 1) "ctr" 2) "0.051000"2) (integer) 17909856001233) (integer) 5020127.0.0.1:6379> FEATURE.GET user_features user:999(nil)Compatibility
Section titled “Compatibility”HotKV-only command. Redis and Valkey have no equivalent.
See also
Section titled “See also”FEATURE.CREATE, FEATURE.SET, FEATURE.BATCH, FEATURE.SCHEMA, FEATURE.STATS, FEATURE.DROP, FEATURE.LIST, AI features guide
Was this page helpful?
Thanks for the feedback.