摘要: 特殊数据类型 ARRAY,MAP,STRUCT CREATE TABLE employee( name string, salary double, subor array<string>, dedu map<string, double>, address struct<street:string 阅读全文
posted @ 2021-11-21 19:53 Shydow 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 前提 需要安装hadoop和MySQL数据库 安装步骤 解压初始化环境变量 tar -zxvf apache-hive-2.3.4-bin.tar.gz -C /app/export HIVE_HOME=/app/apache-hive-2.3.4-binexport PATH=$PATH:$HIV 阅读全文
posted @ 2021-11-21 17:57 Shydow 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Hive 1 CREATE TABLE t_docs (line string); 2 3 LOAD DATA LOCAL INPATH '/opt/workspace/docs.dat' INTO TABLE t_docs; 4 5 WITH tmp AS ( 6 SELECT explode(s 阅读全文
posted @ 2021-11-21 15:05 Shydow 阅读(77) 评论(0) 推荐(0) 编辑