Guest User

Untitled

a guest
Apr 24th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. There is no primary key in hive, we can use "describe formatted table_name" to check the fields of a table.
  2. sysdate(-1) returns the date of yesterday
  3. sysdate( 0) returns the date of today
  4. sysdate( 1) returns the date of tomorrow
  5. Use "group by" instead of "distinct".
  6. Always remember using dp/dt to select partitions to improve the efficiency.
  7.  
  8. Use select * from table_name limit 10 to check it out firstly.
  9.  
  10. Use SHOW PARTITIONS table_name to check the partitions.
Add Comment
Please, Sign In to add comment