Created
March 7, 2016 09:23
-
-
Save chiangqiqi/3ef673c2363bd0b552ab to your computer and use it in GitHub Desktop.
hive 创建按照日期分割的表
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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