Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Query
    • Data formats and compression algorithms
      • Reading data using connections
      • Reading data using bindings
      • Writing data
    • Working with Managed Service for ClickHouse® databases
    • Working with Managed Service for Greenplum® databases
    • Working with Managed Service for MySQL® databases
    • Working with Managed Service for PostgreSQL databases
    • Working with Managed Service for YDB databases
    • Writing metrics to Yandex Monitoring
  • Access management
  • Pricing policy
  • Integration
  • Audit Trails events
  • FAQ

In this article:

  • Setting up a data binding
  • Data model
  • Example of reading data using bindings
  1. Data sources and targets
  2. Working with Yandex Object Storage
  3. Reading data using bindings

Reading data from Object Storage using Query bindings

Written by
Yandex Cloud
Updated at March 6, 2025
  • Setting up a data binding
  • Data model
  • Example of reading data using bindings

There are cases when you need to run the same data queries on a regular basis. To avoid entering all the details of handling this data each time you make a query, you can use bindings.

Sample data read query using bindings:

SELECT
    *
FROM
    `logs`
WHERE
    version>1

Setting up a data bindingSetting up a data binding

To create a binding to read data from Object Storage:

  1. In the management console, select the folder where you want to create a binding.

  2. In the list of services, select Yandex Query.

  3. In the left-hand panel, go to the Bindings tab.

  4. Click Create.

  5. Under Connection parameters:

    1. In the Type field, select Object Storage.
    2. In the Connection field, select an existing connection or create a new one.
  6. Under Binding parameters:

    1. In the Name field, specify the binding name.

    2. In the Path field, specify the path to bucket data. Parts of file names can be specified using /*, such as yellow/*.csv.

    3. In the Compression field, specify the data compression method.

    4. In the Format field, specify the format of stored data.

    5. Select a partitioning mode and list partitioning columns and their types.

      If you are using the Extended mode, specify the partition projection columns.

    6. List data columns and their types.

      Alternatively, you can click Detect columns to do this automatically.

  7. To check the data, click Preview.

  8. Click Create.

Data modelData model

Object Storage stores data as binary files. To read data, use the following SQL statement:

SELECT
    <expression>
FROM
    `<binding>`
WHERE
    <filter>;

Where:

  • <binding>: Name of the previously created data binding.

Example of reading data using bindingsExample of reading data using bindings

Sample query to read data from Object Storage using bindings:

SELECT
    *
FROM
    `binding_name`

Where binding_name is the data binding name in Object Storage.

Was the article helpful?

Previous
Reading data using connections
Next
Writing data
Yandex project
© 2025 Yandex.Cloud LLC