Skip to main content
Skip to main content

YTsaurus

Experimental feature. Learn more.
Not supported in ClickHouse Cloud

The YTsaurus table engine allows you to import data from a YTsaurus cluster.

Creating a table

    CREATE TABLE [IF NOT EXISTS] [db.]table_name
    (
        name1 [type1],
        name2 [type2], ...
    ) ENGINE = YTsaurus('http_proxy_url', 'cypress_path', 'oauth_token')
Info

This is an experimental feature that may change in backwards-incompatible ways in future releases. Enable usage of the YTsaurus table engine using setting allow_experimental_ytsaurus_table_engine.

You can do so using:

SET allow_experimental_ytsaurus_table_engine = 1.

Engine parameters

  • http_proxy_url — URL to the YTsaurus http proxy.
  • cypress_path — Cypress path to the data source.
  • oauth_token — OAuth token.

Usage example

Shows a query creating the YTsaurus table:

SHOW CREATE TABLE yt_saurus;
CREATE TABLE yt_saurus
(
    `a` UInt32,
    `b` String
)
ENGINE = YTsaurus('http://localhost:8000', '//tmp/table', 'password')

To return the data from the table, run:

SELECT * FROM yt_saurus;
 ┌──a─┬─b──┐
 │ 10 │ 20 │
 └────┴────┘

Data types

Primitive data types

YTsaurus data typeClickhouse data type
int8Int8
int16Int16
int32Int32
int64Int64
uint8UInt8
uint16UInt16
uint32UInt32
uint64UInt64
floatFloat32
doubleFloat64
booleanBool
stringString
utf8String
jsonJSON
yson(type_v3)JSON
uuidUUID
date32Date(Not supported yet)
datetime64Int64
timestamp64Int64
interval64Int64
dateDate(Not supported yet)
datetimeDateTime
timestampDateTime64(6)
intervalUInt64
anyString
nullNothing
voidNothing
T with required = FalseNullable(T)

Composite types

YTsaurus data typeClickhouse data type
decimalDecimal
optionalNullable
listArray
structNamedTuple
tupleTuple
variantVariant
dict`Array(Tuple(...))
taggedT

See Also