Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
marcus_behrens
Advisor
Advisor
0 Kudos
Have you ever ingested sensor data and due to one little glitch in the setup you have one extreme outlier in the data that makes the sensor chart unreadable (see first image)?

Don't worry, if it is just this one you can narrow down to the exact timeframe that holds only this one outlier (see second image). then take note of the from and to time stamps (you need to convert the time shown in the UI to utc time).

Then do a get request against this timeframe to see that you have locked down the right timeframe - for example:

 

https://onboardtest2cf.flp-iot-sap.cfapps.eu10.hana.ondemand.com/appiot-mds/Things('F92E92EF251D4922...

returned

{
"value": [
{
"_time": "2018-08-17T06:21:23.475Z",
"temperature": -3276.7,
"humidity": 76.7
},
{
"_time": "2018-08-17T06:21:23.469Z",
"temperature": -3276.7,
"humidity": 76.7
},
{
"_time": "2018-08-17T06:21:23.468Z",
"temperature": -3276.7,
"humidity": 76.7
}
]
}

Now do a Delete Request from e.g. postman on this timeframe on the same api like this: https://onboardtest2cf.flp-iot-sap.cfapps.eu10.hana.ondemand.com/appiot-mds/Things('F92E92EF251D4922...

And voila - the outlier is gone. Both in the raw data and in the Aggregates on an hourly basis (see third image).

 







You might still have another outlier of smaller magnitude as shown above - but now you know what to to. And if you have a lot of outliers/errors, that follow a pattern you can of course also automate this in Node or Java.