メインコンテンツまでスキップ
メインコンテンツまでスキップ

YTsaurus

Experimental feature. Learn more.
Not supported in ClickHouse Cloud

Experimental table The engine allows to import data from the 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')
参考

This is an experimental feature that may change in backwards-incompatible ways in the future releases. Enable usage of the YTsaurus table engine with allow_experimental_ytsaurus_table_engine setting. Input the command 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')

Returns the data from the table:

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