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
    • 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:

  • Data reading example
  • Supported compression algorithms
  • Reads
  • Writing to Yandex Object Storage
  • Writing to Yandex Data Streams
  1. Data sources and sinks
  2. Data formats and compression algorithms

Data formats and compression algorithms

Written by
Yandex Cloud
Improved by
Max Z.
Updated at July 1, 2026
View in Markdown
  • Data reading example
  • Supported compression algorithms
    • Reads
    • Writing to Yandex Object Storage
    • Writing to Yandex Data Streams

Below you will find the data formats and compression algorithms supported in Yandex Query.

Supported data formatsSupported data formats

Yandex Query Language supports the following data formats:

  • csv_with_names
  • tsv_with_names
  • json_list
  • json_each_row
  • raw
  • json_as_string
  • parquet

Csv_with_namesCsv_with_names

This format is based on the CSV format. The data is arranged in comma-separated columns with the first row containing column names.

Sample data:

Year,Manufacturer,Model,Price
1997,Ford,E350,3000.00
1999,Chevy,"Venture «Extended Edition»",4900.00
Query example
SELECT
    *
FROM <connection>.<path>
WITH
(
    format=csv_with_names,
    SCHEMA
    (
        Year int,
        Manufacturer string,
        Model string,
        Price double
    )
)

Query results:

# Manufacturer Model Price Year
1 Ford E350 3000 1997
2 Chevy Venture «Extended Edition» 4900 1999

Tsv_with_namesTsv_with_names

This format is based on the TSV format. The data is arranged in tab(0x9)-separated columns with the first row containing column names.

Sample data:

Year    Manufacturer    Model   Price
1997    Ford    E350    3000.00
1999    Chevy   "Venture «Extended Edition»"    4900.00
Query example
SELECT
    *
FROM <connection>.<path>
WITH
(
    format=tsv_with_names,
    SCHEMA
    (
        Year int,
        Manufacturer string,
        Model string,
        Price double
    )
)

Query results:

# Manufacturer Model Price Year
1 Ford E350 3000 1997
2 Chevy Venture «Extended Edition» 4900 1999

Json_listJson_list

This format is based on the JSON format. With this format, each file must contain a valid JSON object.

Example of valid data presented as a list of JSON objects:

[
    { "Year": 1997, "Manufacturer": "Ford", "Model": "E350", "Price": 3000.0 },
    { "Year": 1999, "Manufacturer": "Chevy", "Model": "Venture «Extended Edition»", "Price": 4900.00 }
]

Example of invalid data: each line contains a separate JSON object, but these objects are not combined into a list:

{ "Year": 1997, "Manufacturer": "Ford", "Model": "E350", "Price": 3000.0 }
{ "Year": 1999, "Manufacturer": "Chevy", "Model": "Venture «Extended Edition»", "Price": 4900.00 }

Json_each_rowJson_each_row

This format is based on the JSON format. With this format, each individual line within each file must contain a valid JSON object, without wrapping them into a list. This format is used for data transmission over streaming systems, such as Yandex Data Streams.

Example of valid data: each line contains a separate JSON object, without wrapping them into a list:

{ "Year": 1997, "Manufacturer": "Ford", "Model": "E350", "Price": 3000.0 },
{ "Year": 1999, "Manufacturer": "Chevy", "Model": "Venture «Extended Edition»", "Price": 4900.00 }
Query example
SELECT
    *
FROM <connection>.<path>
WITH
(
    format=json_each_row,
    SCHEMA
    (
        Year int,
        Manufacturer string,
        Model string,
        Price double
    )
)

Query results:

# Manufacturer Model Price Year
1 Ford E350 3000 1997
2 Chevy Venture «Extended Edition» 4900 1999

RawRaw

This format allows reading file contents in raw form. This data can then be split into rows and columns and processed via YQL.

Use this format when Yandex Query‘s built-in data parsing capabilities are insufficient.

Query example
SELECT
    *
FROM <connection>.<path>
WITH
(
    format=raw,
    SCHEMA
    (
        Data String
    )
)

Query results:

Year,Manufacturer,Model,Price
1997,Ford,E350,3000.00
1999,Chevy,\"Venture «Extended Edition»\",4900.00

Json_as_stringJson_as_string

This format is based on the JSON format. Instead of splitting the input JSON document into fields, this format treats each line of the file either as a single JSON object or a single string. It is convenient when the list of fields is not fixed and may change across different messages.

With this format, each file must contain:

  • Valid JSON object on each individual line of the file.
  • Valid JSON objects wrapped in a list.

Example of valid data presented as a list of JSON objects:

{ "Year": 1997, "Manufacturer": "Ford", "Model": "E350", "Price": 3000.0 }
{ "Year": 1999, "Manufacturer": "Chevy", "Model": "Venture «Extended Edition»", "Price": 4900.00 }
Query example
SELECT
    *
FROM <connection>.<path>
WITH
(
    format=json_as_string,
    SCHEMA
    (
        Data Json
    )
)

Query results:

# Data
1 {"Manufacturer": "Ford", "Model": "E350", "Price": 3000, "Year": 1997}
2 {"Manufacturer": "Chevy", "Model": "Venture «Extended Edition»", "Price": 4900, "Year": 1999}

ParquetParquet

This format allows you to read the contents of Apache Parquet files.

Data compression algorithms supported in Parquet files:

  • No compression
  • SNAPPY
  • GZIP
  • LZO
  • BROTLI
  • LZ4
  • ZSTD
  • LZ4_RAW
Query example
SELECT
    *
FROM <connection>.<path>
WITH
(
    format=parquet,
    SCHEMA
    (
        Year int,
        Manufacturer string,
        Model string,
        Price double
    )
)

Query results:

# Manufacturer Model Price Year
1 Ford E350 3000 1997
2 Chevy Venture «Extended Edition» 4900 1999

Data reading exampleData reading example

Sample query for reading data from Yandex Object Storage.

SELECT
        *
FROM
    connection.`folder/filename.csv`
WITH(
    format='csv_with_names',
    SCHEMA
    (
        Year int,
        Manufacturer String,
        Model String,
        Price Double
    )
);

Where:

Field Description
connection Yandex Object Storage connection name
folder/filename.csv File path within the Yandex Object Storage bucket
SCHEMA Data schema description in the file

Supported compression algorithmsSupported compression algorithms

ReadsReads

Yandex Query supports the following compression algorithms for reading 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, Yandex Query also enables you to write parquet data using these:

Compression format Name in Query
Raw raw
Snappy snappy

Writing to Yandex Object StorageWriting to Yandex Object Storage

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)

Writing to Yandex Data StreamsWriting to Yandex Data Streams

Data Streams only lets you write data as a byte stream, which is processed by the receiving side.

When writing to Data Streams, file format and compression algorithm settings are not applied.

Was the article helpful?

Previous
Connecting via an IDE
Next
Reading data via connections
© 2026 Direct Cursus Technology L.L.C.