Best way to fix wrong historic values
I'm developing a system that will be deployed multiple times for multiple clients, and with the testing I bumped into something that I'm not sure if it has already been solved, so first I would like to apologize if it has.
Turns out I had to disable a data source while some renovations were made and, when I enabled it again, I didn't realize that 2 data points were logging wrong values because the sensors linked to them were disconnected. Now, when performing statistics analysis, those wrong values make the average and the minimum value go wrong.
Today, I was looking all over the new and old UI for an option to easily fix this couple of hours period (setting the wrong logged values to the last correct value); I haven't been able to find an easy way. The only way I found that I think would make this possible is with an SQL update submission but, since the corruption risk seems to be high, I was wondering if there was an easier way to do this.
I hope this exists, because I can already see this happening with our clients a lot; maintenance technicians always do whatever they please even if they don't know what they're doing. In a system that we installed prior to using Mango this was a very common occurrence, and I wouldn't like to risk corrupting the database every time I need to fix values.
Thanks in advance.
CraigWeb last edited by
This is definitely possible. The import data icon is to the right of the log icon. I suggest you read the information in the help document on the data import page.
my workflow on this in the past has been like this: Go to the legacy data point page---> select your point and the time frame you want to edit. ---> change the format to a CSV and click the green down arrow to download it.
Change the values appropriately and save the file. I prefer to no use excel for this process as it sometimes formats number cells in a way you don't want. ---> go to the data import page and upload your file.
Perfect! I was looking for a more specific function but this seems to be an easy enough path.
Anyways, I tried this multiple times now; the uploaded CSV doesn't seem to update the stored values.
I used Visual Studio Code with the Edit CSV plugin to edit it, first I tried just deleting the wrong rows, then I actually manipulated the values, both tries with the same result; nothing seems to be happening when I import the data.
First I thought maybe I had to restart the MangoES, but this doesn't seem to change anything.
Is there something else I need to do after clicking "Submit"? If I deleted values, shouldn't the "removed" column tell me how many values were removed, or what are the "Added, Removed, Errors" columns for? (All 3 columns say 0)
Thanks a lot!
JoelHaggar last edited by
Did you check the help file on the Data Import page? You need to have the "modify" column marked with 'delete' for any values you want deleted.
Hi, @JoelHaggar .
True, sorry, the deletion now works, but the help also tells me "if blank the value will be updated in Mango using the timestamp to find the value to update".
I had tried that before to set the wrong values to a custom value, but nothing happened. Would it be better to duplicate the rows and have the rows with the wrong values marked as 'delete' and the modified ones as 'add'?
CraigWeb last edited by
I got the same issue as you. Could not get the points to update. Eventually used the CSV to delete the points ana then add them again with new values.
I found this quite odd as I I am almost 100% sure I have used the update in the past.