I use:
Hive: Start Hive
The command must end with a semicolon telling Hive to execute the command immediately, not case sensitive
show tables; see what tables are available
DESC TableName; See which columns are in the table
Write SQL command
Use UDW;
Select user_id,action_id
from Udw_ml_user_action
where partition_date>=20150410
Distribute by user_id
Sort by user_id,action_id
Limit ten;
Execute sql:hive-f Test.sql
Results of Export search: redirected to files in other formats: Hive-f *.sql >a.txt
II Some commands for querying data
ORDER BY: Full ordering, but only through a reducer, large data sets are less efficient
Sort by: Produces a sort file for each reducer
Distribute by: Controls which reducer a particular line should go to; For example, distribute by year guarantees that all rows with the same years end up in the same reducer partition
GROUP BY: Group Rows by field
Simple instructions for using hive