type
status
date
slug
summary
tags
category
icon
password

第一套Hive

#新建comm的数据库

#创建外部表ods_behavior_log


external: 加上为外部表
partitioned by (): 自定义分区字段
row format delimited: 自定义数据组织
fields terminated by ‘’: 以‘‘分隔
location ‘’: 存储位置
 

#创建分区

#加载数据到分区

#查询现有所有分区

#查询前三行数据

#查询外部表ods_behavior_log数据总行数

#创建外部表dwd_behavior_log


external: 加上为外部表
partitioned by (): 自定义分区字段
row format delimited: 自定义数据组织
fields terminated by ‘’: 以‘‘分隔
stored as orc: 文件类型为orc
location ‘’: 存储位置
tblperties(’orc.compress’=’SNAPPY’)