Hi,
I have a table created with
CREATE TABLE raw(partition1 string, partition2 string, data string) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\001' STORED AS TEXTFILE;
I want to further process "data" and put it in a partition (partition1, partition2) defined by the values in the relevant row.
I'm however stuck at trying to use dynamic partitions in a query. With predefined partition values it's straightforward:
FROM (
FROM raw
SELECT TRANSFORM(raw.data)
USING 'python parser.py' AS (foo STRING, date STRING, bar MAP<STRING,STRING>)
CLUSTER BY date
) tmap
INSERT OVERWRITE TABLE polished PARTITION (partition1='p1', partition2='p2') SELECT foo, date, bar;
What would be the best way to define the partition using raw.partition1 and raw.partition2 as values?
Thanks much,
Adriaan