CREATE TABLE hbase_table_3(key string, value2 int)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.columns.mapping" = ":key,a:b"
);
INSERT OVERWRITE TABLE hbase_table_3
SELECT coalesce(concat(stock_symbol,'-',year(trade_date)),'NULL'), count(*)
FROM stock_trade
group by coalesce(concat(stock_symbol,'-',year(trade_date)),'NULL');
댓글 없음:
댓글 쓰기