FEATURE.SETAT
FEATURE.SETAT group entity unix-ms feature value [feature value ...]
- Group
- Feature store
- Complexity
- O(F) where F is the number of features given
- Arity
- -6 (at least 6 words, counting the command name)
- Flags
- write, fast
- Keys
- first 1, last 1, step 1
- HotKV Cloud
- Performance and Scale
- On-Premise
- requires the feature-store license feature
FEATURE.SETAT is FEATURE.SET with the time to stamp
the entity with, in Unix milliseconds, as updated_at_ms in
FEATURE.GET. Use it to load history. Replicas, the
append-only file and a replica that takes over keep the same update time as the
primary.
Return value
Section titled “Return value”Simple string OK in RESP2 and RESP3. Errors:
| Error | Cause |
|---|---|
ERR invalid timestamp |
The time is not a positive number within 100 years of now. |
ERR group not found |
The feature group does not exist. |
ERR wrong number of arguments for 'feature.setat' command |
No feature and value pair. |
NOLICENSE feature-store requires a HotKV license. Contact sales@hotkv.com |
The license does not include feature-store. |
Examples
Section titled “Examples”127.0.0.1:6379> FEATURE.CREATE users "user features" SCHEMA age int64 country stringOK127.0.0.1:6379> FEATURE.SETAT users u1 1700000000000 age 31 country DEOK127.0.0.1:6379> FEATURE.GET users u11) 1) "age" 2) (integer) 31 3) "country" 4) "DE"2) (integer) 17000000000003) (integer) 91069527033127.0.0.1:6379> FEATURE.SETAT users u1 0 age 32(error) ERR invalid timestamp127.0.0.1:6379> FEATURE.SETAT users u1 -5 age 32(error) ERR invalid timestamp127.0.0.1:6379> FEATURE.SETAT users u1 99999999999999 age 32(error) ERR invalid timestamp127.0.0.1:6379> FEATURE.SETAT nogroup u1 1700000000000 age 31(error) ERR group not found127.0.0.1:6379> FEATURE.SETAT users u1 1700000000000(error) ERR wrong number of arguments for 'feature.setat' commandThe third element of the FEATURE.GET reply is the age of the entity in
milliseconds, so it is large here: the entity was stamped with a time in 2023.
Compatibility
Section titled “Compatibility”HotKV-only command. Redis and Valkey have no equivalent.
See also
Section titled “See also”FEATURE.SET, FEATURE.GET, FEATURE.CREATE
In a cluster: AI engines in a cluster
Was this page helpful?
Thanks for the feedback.