hive

오민석·2022년 7월 13일
0

CREATE EXTERNAL TABLE tb_sample (
userid INT,
viewTime INT
)
PARTITIONED BY (year int, month int)
STORED AS PARQUET
LOCATION '/data/tb_sample'

INSERT INTO tb_sample PARTITION(year=2020, month=5) VALUES (2020,5);

INSERT INTO tb_sample PARTITION(year=2020, month=6) VALUES (2020,6);

INSERT INTO tb_sample PARTITION(year=2021, month=6) VALUES (2021,6);

https://dwgeek.com/hive-insert-into-partition-table-and-examples.html/

https://moons08.github.io/programming/Hive_Partition/

0개의 댓글