uCosminexus Stream Data Platform - Application Framework Description
This subsection explains a query that performs data calculations, using an example that converts temperature data that was collected in degrees Celsius to degrees Fahrenheit. To convert Celsius to Fahrenheit, the query needs to include a mathematical formula. The following figure shows the input and output data present when this query is executed.
Figure 2-17 Input and output data present when a query designed to perform data calculations is executed
REGISTER STREAM temperature_stream (observation_time TIME, id INTEGER, temperature INTEGER); REGISTER QUERY unit_conversion ISTREAM ( SELECT observation_time, id, temperature*9/5+32 AS fahrenheit_temperature FROM temperature_stream[ROWS 1]); |
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.