我创建了一个表:
CREATE EXTERNAL TABLE extab (
vendorID string,
orderID string ,
ordertime string
)
location '/common_folder/data'
然后我按月和日创建了一个分区
CREATE EXTERNAL TABLE part_extab(
endorID string,
orderID string ,
ordertime string
)
PARTITIONED by (month string, day string)
location '/common_folder/data'
然后将数据插入到分区表中
INSERT OVERWRITE TABLE
select vendorId, orderId, ordertime , month, day
FROM extab
如何从 ordertime 中提取月、日?