Slide 48
Slide 48 text
-- ΧϥϜφετϨʔδͷ External Table ʹΠϯϙʔτ
INSERT OVERWRITE TABLE orc_actions
PARTITION (`date` = '${DATE}', `hour` = '${HOUR}')
SELECT
user_id, timestamp, COALESCE(os, "undefined"), COALESCE(country, "undefined"), action
modify_json(data, 'unnecessary1', 'unnecessary2')
FROM raw_actions
LATERAL VIEW json_tuple(
raw_actions.json, 'userId', 'timestamp', 'platform', 'country', 'action', 'data'
) a as user_id, timestamp, os, country, action, data
WHERE date = '${DATE}' and hour = '${HOUR}'
ORDER BY os,country, action, user_id;
)JWFʹΑΔ&5-
KTPO@UVQMFؔFYQMPEFؔͳͲͰ+40/Λల։͢Δ
ࣗ࡞6%'ͰɺಛఆϑΟʔϧυͷ+40/͔ΒෆཁͳϑΟʔϧυআ