Querying real-time data
You can process data from both Yandex Object Storage storage systems and Yandex Data Streams data streaming buses.
The example below shows how to split input data into one-minute intervals, count the number of events within each interval, and calculate the totals per interval:
SELECT
HOP_END() AS time,
COUNT(*) AS ride_count,
SUM(total_amount) AS total_amount
FROM
(
SELECT
*
FROM
bindings.`tutorial-streaming`
LIMIT 10
)
GROUP BY
HOP(Just(CAST(tpep_pickup_datetime AS Timestamp)), "PT1M", "PT1M", "PT1M");
Useful links
- SELECT
operator - GROUP BY
operator - HOP operator
- Data aggregation function