boelle
(Bo Herrmannsen)
25 April 2020 19:08
1
Hi
i have a selfhosted install of emoncms and happy about it
but false data has entered some of the feeds, they are easy to find as i just have to search for data values that are past 80
they come from an ill configured device that sends data in to 6 feeds,
how can i delete data from all 6 feeds when i have the time stamp from the first feed?
borpin
(Brian Orpin)
25 April 2020 19:35
2
You would be better deleting the feeds from the UI. If you only want to delete the data, you can do so from the same UI interface.
Or do you just want to delete a couple of data points?
boelle
(Bo Herrmannsen)
25 April 2020 19:46
3
i tried to delte from the UI but when i click on the feed nothing comes up
its a little more than “a couple”
and i need to delete the same amount in feed_8 to feed_12
and all i have to go after is the time stamp from feed_7
borpin
(Brian Orpin)
25 April 2020 19:49
4
select the checkbox. then a dustbin icon will appear at the top.
If he does that, won’t it zap the entire feed?
He indicated that he wanted to zap values “past 80.”
Not sure, but it sounds like he’s after zapping feeds with values greater than 80 in them.
boelle
(Bo Herrmannsen)
25 April 2020 19:52
6
15768 data points in each feed to find and delete
is there not an sql command that can do it? ie from phpmyadmin
borpin
(Brian Orpin)
25 April 2020 19:54
8
Possibly but I don’t know.
No, you can trim data using the same UI.
1 Like
Yes, it looks like this:
DELETE FROM table_name
WHERE condition;
borpin
(Brian Orpin)
25 April 2020 19:55
11
Except I’d not noticed these are SQL feeds though it does say that in the title
boelle
(Bo Herrmannsen)
25 April 2020 19:56
12
yes but its only in the first feed i know the condition and i allready have that
SELECT * FROM feed_7
WHERE data
> 80
for the others the condition is the timestamp found in the first condition
boelle
(Bo Herrmannsen)
25 April 2020 19:58
13
hehe
i opted to use SQL on my selfhosting(hosted at simply.com ) as they have unlimited database space and they said i could post data as crazy i wanted
so i have several devices that send 6 streams of data at 10 sec interval
OK.
What you need to do is get the timestamp of the first condition and add it to the query.
The result will be similar to:
SELECT * FROM feed_7 WHERE data > 80 and timestamp = TIMESTAMP
where TIMESTAMP is the actual timestamp in the first condition.
Are we dealing with a single timestamp in the first condition, or multiple timestamp values?
boelle
(Bo Herrmannsen)
25 April 2020 20:08
16
boelle:
15768 data points
and that is in each of the 6 feeds
If you know the range of the timestamps in the first condition, you can specify that range
as the second condition.
e.g. SELECT * FROM feed_7 WHERE data > 80 and timestamp > xxxxxx and timestamp < yyyyyy
boelle
(Bo Herrmannsen)
25 April 2020 20:09
18
the pic is of the first data point in the first feed table
Do ALL of the rows you want to zap contain data > 80
?
boelle
(Bo Herrmannsen)
25 April 2020 20:17
20
no, that is why i’m asking
feed_7 is the only one where i can use that condition
for feed_8 to feed_12 i have to delete with the time value found in feed_7