Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Query
    • Overview
    • Batch processing
    • Streaming processing
    • Unified analysis of streaming and analytical data
  • Access management
  • Pricing policy
  • Integrations
  • Audit Trails events
  • FAQ

In this article:

  • Get ready to work
  • Create a data stream
  • Set up data generation
  • Run the query
  • Check the result
  • Useful links
  1. Getting started
  2. Streaming processing

Yandex Data Streams streaming data processing

Written by
Yandex Cloud
Updated at July 7, 2026
View in Markdown
  • Get ready to work
  • Create a data stream
  • Set up data generation
  • Run the query
  • Check the result
  • Useful links

In this example, you will run streaming data processing on New York City taxi ride data. Data for the example will be written to a dedicated Yandex Data Streams stream by a generator.

The result will be the total fare of the first ten rides written to the stream after processing started.

To run this example:

  1. Get ready to work.
  2. Create a data stream.
  3. Set up data generation.
  4. Run the query.
  5. Check the result.

Note

Yandex Cloud provides the New York City taxi trips dataset as is. Yandex Cloud makes no express or implied representations, warranties, or conditions pertaining to your use of the specified dataset. To the extent permitted by your local law, Yandex Cloud shall not be liable for any loss or damage, including direct, indirect, consequential, special, incidental, or punitive, resulting from your use of the dataset.

NYC Taxi and Limousine Commission (TLC):

The data was collected and provided to the NYC Taxi and Limousine Commission (TLC) by technology providers authorized under the Taxicab & Livery Passenger Enhancement Programs (TPEP/LPEP). The taxi trip data was not created by the TLC, and the TLC makes no representations whatsoever about the accuracy of this data.

Please review the dataset’s original source and its terms of use.

Get ready to workGet ready to work

  1. Log in to the management console or sign up if you have not already. If you have not signed up yet, navigate to the management console and follow the instructions.
  2. On the Yandex Cloud Billing page, make sure you have an ACTIVE or TRIAL_ACTIVE billing account. If you do not have a billing account yet, create one.
  3. If you do not have a folder yet, create one.
  4. We will connect to the data stream using a service account. Create a service account named datastream-connection-account and assign it the ydb.editor role.
  5. Data streams use Yandex Managed Service for YDB. You will need to create a serverless database.

Create a data streamCreate a data stream

  1. In the management console, select the folder where you need to create a data stream.
  2. Navigate to Data Streams.
  3. Click Create stream.
  4. Specify the Yandex Managed Service for YDB database created earlier.
  5. Name the data stream: yellow-taxi.
  6. Click Create.

Set up data generationSet up data generation

  1. Create a connection:

    1. In the management console, select the folder where you want to create a connection.
    2. Navigate to Yandex Query.
    3. In the left-hand panel, select Tutorial.
    4. Navigate to Streaming.
    5. Under Create infrastructure for tutorial, click Create connection.
    6. In the window that opens, under Connection type parameters, select the database and service account you created earlier.
    7. Click Create.
  2. Create a data binding:

    1. This will open the create data binding page.
    2. Under Binding parameters, select the yellow-taxi stream you created earlier.
    3. Click Create.

The generator will start writing data to the yellow-taxi stream. You can control the generator using the Stop and Start buttons.

Run the queryRun the query

  1. In the query editor within the Query interface, click New streaming query.

  2. Enter the query text in the text field:

    $data = 
    SELECT 
        *
    FROM
        bindings.`tutorial-streaming` LIMIT 10;
    
    SELECT
        HOP_END() AS time,
        COUNT(*) AS ride_count,
        SUM(total_amount) AS total_amount
    FROM 
        $data
    GROUP BY 
        HOP(CAST(tpep_pickup_datetime AS Timestamp), "PT1M", "PT1M", "PT1M");
    
  3. Click Run.

Check the resultCheck the result

Once completed, the query returns the total fare (total_amount) of the first 10 rides written to the stream after processing started.

# time ride_count total_amount
1 2022-11-28T16:05:00.000000Z 10 5675.542679843059

Useful linksUseful links

  • HOP operator and window parameters in streaming data processing
  • Aggregate functions in YQL
  • SQL syntax
  • Streaming data analysis

Was the article helpful?

Previous
Batch processing
Next
Unified analysis of streaming and analytical data
© 2026 Direct Cursus Technology L.L.C.