Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • 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
    • Data formats and compression algorithms
      • Reading data via connections
      • Reading data via bindings
      • Writing data
    • Working with Managed Service for ClickHouse® databases
    • Working with Yandex MPP Analytics for PostgreSQL databases
    • Working with Managed Service for MySQL® databases
    • Working with Managed Service for PostgreSQL databases
    • Working with Managed Service for YDB databases
    • Reading Iceberg tables
  • Access management
  • Pricing policy
  • Integrations
  • Audit Trails events
  • FAQ

In this article:

  • Writing data via connections
  • Example
  • Writing data via bindings
  • Example
  • Supported write formats
  1. Data sources and sinks
  2. Working with Yandex Object Storage
  3. Writing data

Writing data to Yandex Object Storage

Written by
Yandex Cloud
Updated at July 1, 2026
View in Markdown
  • Writing data via connections
    • Example
  • Writing data via bindings
    • Example
  • Supported write formats

In Yandex Query, you can use connections or bindings to write data to Yandex Object Storage buckets.

Query example for writing JSON data via a binding:

INSERT INTO `my_binding`
SELECT
    "value" AS value, "name" AS name
FROM
    $data;

For a list of supported data formats and compression algorithms, see Supported write formats.

Writing data via connectionsWriting data via connections

Connections are a convenient way to write data when prototyping or initially configuring data writing. To write data to a bucket, create a connection to Object Storage and then use the following SQL statement:

INSERT INTO <connection>.<path>
    WITH
    (
        format='<data_format>',
        compression='<compression_format>'
    )
SELECT
    <expression>
FROM
    <query>

Where:

  • <connection>: Object Storage connection name.
  • <path>: Target path within the bucket.
  • <query>: Query source data query.

ExampleExample

Query example for writing data to Object Storage via connections:

INSERT INTO `connection`.`test/`
    WITH
    (
        format='csv_with_names'
    )
SELECT
    "value" AS value, "name" AS name

Where:

  • connection: Object Storage connection name.
  • test/: Target path within the bucket.

Writing data via bindingsWriting data via bindings

If you need to write data regularly, you can use bindings to avoid specifying all data operation details in each query. To write data to a bucket, create a binding in Object Storage and then use the following SQL statement:

INSERT INTO `<binding>`
SELECT
    <expression>
FROM
    <query>

Where:

  • <binding>: Object Storage data binding name.
  • <query>: Query source data query.

ExampleExample

Query example for writing data to Object Storage via a binding:

INSERT INTO `test`
SELECT
    "value" AS value, "name" AS name

Where:

  • test: Object Storage data binding name.

Supported write formatsSupported write formats

The service currently supports the following formats for writing data:

Data format Name in Query
CSV csv_with_names
Parquet parquet

Query supports the following compression algorithms for writing data:

Compression format Name in Query
Gzip gzip
Zstd zstd
LZ4 lz4
Brotli brotli
Bzip2 bzip2
Xz xz

While the parquet format supports built-in compression algorithms, Query also enables you to write parquet data using these:

Compression format Name in Query
Snappy None (used by default)

Was the article helpful?

Previous
Reading data via bindings
Next
Reading data via connections
© 2026 Direct Cursus Technology L.L.C.