Update query to only put new samples in
This commit is contained in:
parent
9329f1e992
commit
d83bb3b58c
1 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
||||||
INSERT INTO public."glucose-import"
|
INSERT INTO public."glucose-import"
|
||||||
(SELECT nextval('glucose-import_id_seq'), "glucose"."deviceSerialNumber", "glucose"."deviceType", units, value, time FROM influx.glucose);
|
(SELECT nextval('glucose-import_id_seq'),
|
||||||
|
"glucose"."deviceSerialNumber",
|
||||||
|
"glucose"."deviceType",
|
||||||
|
"glucose".units,
|
||||||
|
"glucose".value,
|
||||||
|
"glucose".time
|
||||||
|
FROM influx.glucose
|
||||||
|
WHERE "glucose".time >= (SELECT max(time) FROM public."glucose-import")
|
||||||
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue