Obsah

HIVE

Přístup k datům

Jazyk

Partitioning a bucketing

Impala

Postup v HIVE

CREATE EXTERNAL TABLE IF NOT EXISTS ap_temp (...)
ROW FORMAT
DELIMITED FIELDS TERMINATED BY '~'
LINES TERMINATED BY '\n'
STORED AS TEXTFILE
LOCATION ‘...’;
CREATE TABLE IF NOT EXISTS ap (...)
PARTITIONED BY (BUS_PROD_TP_DESCR VARCHAR(255))
CLUSTERED BY (ACC_KEY) INTO 32 BUCKETS
STORED AS ORC tblproperties
("orc.compress"="SNAPPY");
INSERT OVERWRITE TABLE ap
PARTITION (BUS_PROD_TP_DESCR)
SELECT
 ...
FROM ap_temp;
 
DROP TABLE ap_temp;