LUA script

Hi,

How would I add data to a timeseries ket using LUA scripting?

Kind Regards,

Van Zyl

Hello Van Zyl,

If I understand your question correctly adding data to a RedisTimeSeries key from a Lua script is as simple as:

EVAL “return redis.call(‘TS.ADD’, KEYS[1], ARGV[1], ARGV[2])” 1 mykey 12345678 42

where ‘mykey’ is the key’s name, 12345678 is the timestamp and 42 is the value.

Cheers,

Itamar