Skip to content

Instantly share code, notes, and snippets.

@chiangqiqi
Created March 7, 2016 09:23
Show Gist options
  • Save chiangqiqi/3ef673c2363bd0b552ab to your computer and use it in GitHub Desktop.
Save chiangqiqi/3ef673c2363bd0b552ab to your computer and use it in GitHub Desktop.
hive 创建按照日期分割的表
create table test_partition (
id int,
name string,
no int)
partitioned by(dt string)
row formatdelimited
fieldsterminated by ','
stored astextfile;
load data local inpath '/home/zhangxin/hive/test_hive.txt' overwrite intotabletest_partition partition (dt='2012-03-05');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment