前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Hive在load data时注意事项

Hive在load data时注意事项

作者头像
幽鸿
修改2020-04-02 14:23:16
7240
修改2020-04-02 14:23:16
举报

长话短说,来一个example实例:建表语句如下:

create table if not exists bdp_log(         tableName string ,             dataTime string ,             startTime string ,             endTime string ,             groupName string ,         dcn1 int,         dcn2 int,         dcn3 int,         dcn4 int,         dcnCount int,         hiveCount int,         executeStatus string) row format delimited fields terminated by '\|' stored as textfile; 

   我们在使用load data local inpath时,导入数据如下:

t6_bal_fund | 20150812 | 2015/08/12 10:08:54 | 2015/08/12 10:11:09 | fund |82|43|NULL|NULL|125|125|0

   必须注意:int类型字段内容与前后的分隔符之间必须无空格,否则导入数据中,对应int类型字段内容为NULL。如果将类型改为double,int类型数据后会默认加上.0。

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档