
OLAP--ClickHouse
ClickHouse是俄罗斯的Yandex于2016年开源的一个用于联机分析(OLAP:Online Analytical Processing)的列式数据库管理系统(DBMS:Database Management System),简称CK , 主要用于在线分析处理查询(OLAP),能够使用SQL
ChenPD27595
The only thing stronger than your craving for blood is your love for this one girl.
展开
-
ClickHouse实战案例-----终
步骤一:准备日志数据 数据是一个标准的JSONROW数据 加载数据 步骤二:将日志数据文件导入到Hive的ODS层 ①:建表并导入数据 create table tb_log( log string ) partitioned by(dt string) ; load data local inpath "/opt/data/log.log" into table tb_log partition(dt='20201007'); ②:json解析数据在hive中建ODS表 cre原创 2020-12-07 23:47:36 · 1888 阅读 · 0 评论 -
ClickHouse中的SQL语法和函数详解
– with语法 with '1' as v select * from tb_user where id=v; --求平均年龄 with (select count(1) from tb_user) as cnt select (sum(age)/cnt) from tb_user; array join 语法 array join 相当于explode+lateral view select id,arr from tb_arr_join array join arr; --会覆盖原先的数组原创 2020-12-06 23:59:41 · 3174 阅读 · 0 评论 -
ClickHouse实践篇
SummingMergeTree引擎 建表 – 将区内相同主键的所有的数据累加 create table tb_summ_merge_tree( id Int8 , name String, cDate Date, cost Float64 ) engine=SummingMergeTree(cost) order by id --主键 partition by name; insert into tb_summ_merge_tree values(1,'zss','2020-10-05',6.9),原创 2020-12-06 22:43:33 · 435 阅读 · 0 评论 -
ClickHouse基本语法及常见存储引擎
ClickHouse的安装 1)安装curl工具 yum install -y curl 2)添加clickhouse的yum镜像 curl -s https://packagecloud.io/install/repositories/altinity/clickhouse/script.rpm.sh | sudo bash 3)检查镜像情况 [root@doit04 yum.repos.d]# yum list | grep clickhouse cli原创 2020-12-04 23:56:30 · 1243 阅读 · 0 评论