add view for measurement
This commit is contained in:
@ -61,3 +61,20 @@ grant select on variable_t to preprocessor;
|
||||
grant insert on measurement_t to preprocessor;
|
||||
grant select on measurement_t to grafana;
|
||||
|
||||
|
||||
create view measurement_v as
|
||||
select m.time as time,
|
||||
m.value as value,
|
||||
v.quantity as quantity,
|
||||
v.unit as unit,
|
||||
v.label as variable,
|
||||
a.label as application
|
||||
from measurement_t m,
|
||||
application_t a,
|
||||
variable_t v
|
||||
where m.variable = v.id and
|
||||
v.app = a.id;
|
||||
|
||||
grant select on measurement_v to grafana;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user