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

  • Supported data formats
  • Csv_with_names
  • Tsv_with_names
  • Json_list
  • Json_each_row
  • Raw
  • Json_as_string
  • Parquet
  • Data reading example
  • Supported compression algorithms
  • Reading
  • 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 August 17, 2026
View in Markdown
  • Supported data formats
    • Csv_with_names
    • Tsv_with_names
    • Json_list
    • Json_each_row
    • Raw
    • Json_as_string
    • Parquet
  • Data reading example
  • Supported compression algorithms
    • Reading
    • 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 CSV-based and keeps your data in comma-separated columns. The first line in the file contains the 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 TSV-based and keeps your data in tab-separated columns (the tab char code is 0x9). The first line in the file contains the 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 JSON-based. Each file must contain a list of objects in a valid JSON representation.

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, with objects not wrapped 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 JSON-based. Each line in the file must contain an object in a valid JSON representation. These objects are not wrapped into a JSON 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 you to read the contents of files without any conversion. 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 JSON-based. Instead of splitting the input JSON document into fields, it treats each line in the file as a single JSON object. Use this format when the list of fields 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.

Within Parquet files, the following compression algorithms are supported:

  • 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

Query example 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

ReadingReading

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.