95% SQL syntax, but can query Hadoop turning HiveQL into Map Reduce Jobs
Explode
Make a new row for each list entry
adid_list is an Array of ints
pageid | adid_list becomes=> pageid | adid
1 | [1,2] 1 | 1
1 | 2
SELECT pageid, adidFROM pageAds LATERAL VIEW explode(adid_list) adTable AS adid;
HIVE COMMAND LINE
DESCRIBE table_name; -- see the column names of the tableSHOW TABLES '\*keyword\*'; -- list all tables that contain 'keyword'SHOW PARTITIONS table_name; -- list all the partition of the tableDROPTABLE table_name; -- erase the tableALTERTABLE table_name_old RENAME TO table_name_new; -- rename tables