#TSQ
An abstraction to help with formatting pickiness and paramater validations.
Built for the Timeseries storage service in Murano.
You need to use either exosite
or
MrMurano
Clone or add as a submodule into the modules directory.
cd modules
git clone https://github.com/tadpol/TSQ
OR
cd modules
git submodule add https://github.com/tadpol/TSQ
- Edit
Solutionfile.json
to addtsq.lua
... "modules": { "tsq": "modules/tsq/tsq.lua" }, ...
local qq = TSQ.q():fields(TSF.new('temp'):mean())
qq:from('wintd')
qq:where_tag_is('sn', 3):OR_tag_is('sn', 5)
qq:AND_time_ago('1h')
qq:groupby('sn'):groupbytime('15m'):fill('prev'):limit(1)
local out = Timeseries.query{ epoch='ms', q = tostring(qq) }