uCosminexus Stream Data Platform - Application Framework Description
Selecting tuples from multiple data streams and performing computational processing to consolidate these tuples into a single tuple is called joining data streams.
This subsection explains a query that joins data streams, using an example that first joins two data streams (temperature and humidity), and then joins tuples from the same observation site. The following figure shows the input and output data present when this query is executed.
Figure 2-20 Input and output data present when a query that joins data streams is executed
REGISTER STREAM temperature_stream (observation_time TIME, id INTEGER, temperature INTEGER); REGISTER STREAM humidity_stream (observation_time TIME, id INTEGER, humidity INTEGER); REGISTER QUERY join_operation ISTREAM ( SELECT temperature_stream.observation_time AS temperature_stream_time, temperature_stream.id AS temperature_stream_id, temperature_stream.temperature, humidity_stream.observation_time AS humidity_stream_time, humidity_stream.id AS humidity_stream_id, humidity_stream.humidity FROM temperature_stream[PARTITION BY id ROWS 1], humidity_stream[PARTITION BY id ROWS 1] WHERE temperature_stream.id = humidity_stream.id); |
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.