下载测试数据文件:
将下载好后的测试文件拷贝到 /var/lib/clickhouse/dictionaries_lib
文件夹下,给出基于 docker
运行的服务命令:
$ docker cp asn.csv clickhouse:/var/lib/clickhouse/dictionaries_lib $ docker cp organization.csv clickhouse:/var/lib/clickhouse/dictionaries_lib $ docker cp sales.csv clickhouse:/var/lib/clickhouse/dictionaries_lib点击复制复制失败已复制
organization.csv
organization.csv
是一份企业组织数据,它将用于 flat
、 hashed
、 cache
、 complex_key_hashed
和 complex_key_cache
字典的演示场景。这份数据有 id
、 code
和 name
三个字段,数据格式如下所示:
1,"a0001","研发部" 2,"a0002","产品部" 3,"a0003","数据部" 4,"a0004","测试部" 5,"a0005","运维部" 6,"a0006","规划部" 7,"a0007","市场部"点击复制复制失败已复制
sales.csv
sales.csv
是销售数据,它将用于 range_hashed
字典的演示场景。这份数据拥有 id
、 start
、 end
和 price
四个字段,数据格式如下所示:
1,2016-01-01,2017-01-10,100 2,2016-05-01,2017-07-01,200 3,2014-03-05,2018-01-20,300 4,2018-08-01,2019-10-01,400 5,2017-03-01,2017-06-01,500 6,2017-04-09,2018-05-30,600 7,2018-06-01,2019-01-25,700 8,2019-08-01,2019-12-12,800点击复制复制失败已复制
asn.csv
asn.csv
是 asn
数据,它将用于演示 ip_trie
字典的场景。这份数据拥有 ip
、 asn
和 country
三个字段,数据格式如下所示:
"82.118.230.0/24","AS42831","GB" "148.163.0.0/17","AS53755","US" "178.93.0.0/18","AS6849","UA" "200.69.95.0/24","AS262186","CO" "154.9.160.0/20","AS174","US"