Using HMSET to update Redis
Are the available Redis commands in the dropdown list or should I go by the complete list at the URL provided when I hover over the ‘?’?
I’m trying to set multiple values for a hash and I’m having trouble grabbing the key-value pairs from my event to send. I’m not sure if it’s a limitation or I’m doing something incorrectly. I’m using ‘__e’ to grab the entire event (Args section) and specifying a key. The Command section allows me to put in hmset.
Best Answer
-
No, only the commonly used commands are listed in the dropdown. The Cribl Stream Redis function supports all available commands, you just need to type them into the command box.
For
HMSET
, youll want to use something like this:The full args look like this:
['key1', key1, 'key2', key2, 'key3', key3]
For purposes of this example,
field1
,field2
, andfield3
have already been extracted, but you can reference any field with the dot notation.Those values are now available in Redis!
0
Answers
-
I must've missed that part about only listing commonly used commands.
This worked for me, thanks.
0 -
No, only the commonly used commands are listed in the dropdown. The Cribl Stream Redis function supports all available commands, you just need to type them into the command box.
For
HMSET
, youll want to use something like this:The full args look like this:
['key1', key1, 'key2', key2, 'key3', key3]
For purposes of this example,
field1
,field2
, andfield3
have already been extracted, but you can reference any field with the dot notation.Those values are now available in Redis!
0