Greg
Greg

Reputation: 149

Virtual column names in ClickHouse

ClickHouse documentation says:

Virtual column is an integral table engine attribute that is defined in the engine source code. You shouldn't specify virtual columns in the CREATE TABLE query and you can't see them in SHOW CREATE TABLE and DESCRIBE TABLE query results. Virtual columns are also read-only, so you can't insert data into virtual columns.

But I cannot find a list of virtual column names. Could you please point out, what are their names? How do I select their values and data types?

Upvotes: 0

Views: 2516

Answers (1)

Denny Crane
Denny Crane

Reputation: 13310

Do you mean MergeTree engine or file or HDFS or what?

MergeTree

_part  -- name of a part
_part_index -- sequential index of the part in the query result
_partition_id -- name of a partition
_part_uuid -- unique part identifier, if enabled `MergeTree` setting `assign_part_uuids` (Part movement between shards)
_partition_value -- values (tuple) of a `partition by` expression
_sample_factor -- sample_factor from the query

Upvotes: 1

Related Questions