标签:put NPU line pac nbsp load exti key partition
1. 创建库
create database gmall;
2. 创建表start_log,ods层表
drop table if exists ods_start_log; CREATE EXTERNAL TABLE ods_start_log (`line` string) PARTITIONED BY (`dt` string) STORED AS INPUTFORMAT ‘com.hadoop.mapred.DeprecatedLzoTextInputFormat‘ OUTPUTFORMAT ‘org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat‘ LOCATION ‘/warehouse/gmall/ods/ods_start_log‘;
3. 导入数据
load data inpath ‘/origin_data/gmall/log/topic_start/2020-06-29‘ into table gmall.ods_start_log partition(dt=‘2020-06-29‘);
创建event_log
drop table if exists ods_event_log; CREATE EXTERNAL TABLE ods_event_log(`line` string) PARTITIONED BY (`dt` string) STORED AS INPUTFORMAT ‘com.hadoop.mapred.DeprecatedLzoTextInputFormat‘ OUTPUTFORMAT ‘org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat‘ LOCATION ‘/warehouse/gmall/ods/ods_event_log‘;
load data inpath ‘/origin_data/gmall/log/topic_event/2020-06-29‘ into table gmall.ods_event_log partition(dt=‘2020-06-29‘);
标签:put NPU line pac nbsp load exti key partition
原文地址:https://www.cnblogs.com/mengbin0546/p/13207443.html