随笔分类 - hive
摘要:hadoop,hbase,zookeeper安装好了,现在来安装hive hadoop 版本:2.8.4 hbase 版本:2.1.3 hive 版本:2.3.4 zookeeper 版本:3.4.13 1.hive下载:http://mirrors.shu.edu.cn/apache/hive/
阅读全文
摘要:#创建分区表CREATE TABLE if not exists data_center.test_partition (id int,name string,age int)PARTITIONED BY (date_id string)row format delimited fields ter
阅读全文
摘要:insert overwrite table ods.zeg_so select *,case when zsm.id is not null then cast(current_timestamp as string) else zs.etl_update end etl_update from
阅读全文
摘要:drop table dw.fct_so;create table dw.fct_so(so_id bigint comment '订单ID',parent_so_id bigint comment '父订单ID (如果未拆单,则等于so_id)',order_code string comment
阅读全文
摘要:1.hive模糊搜索表 show tables like '*name*';2.查看表结构信息 desc formatted table_name; desc table_name;3.查看分区信息 show partitions table_name;4.根据分区查询数据 select table
阅读全文
摘要:1)创建表时:创建内部表时,会将数据移动到数据仓库指向的路径;若创建外部表,仅记录数据所在的路径, 不对数据的位置做任何改变。 2)删除表时:在删除表的时候,内部表的元数据和数据会被一起删除, 而外部表只删除元数据,不删除数据。这样外部表相对来说更加安全些,数据组织也更加灵活,方便共享源数据。
阅读全文