创建表: create table tableName(time INT,userid BIGINT,url STRING,ip STRING COMMENT 'IP Address of the User') COMMENT 'This is the tableName table' PARTITIONED BY (dt STRING,country String) CLUSTERED BY(userid) SORTED BY(time) INTO 32 BUCKETS ROW FORMAT
set hive.cli.print.current.db=true; set hive.mapred.mode=strict; set hive.mapred.mode=nonstrict; SHOW PARTITIONS tablename; --Dynamic Partition Inserts --by position not by names INSERT OVERWRITE TABLE employees PARTITION (country, state) SELECT ...,