I got this question from w3ii.com but finding it difficult to understand.
hive> INSERT OVERWRITE TABLE sales SELECT * FROM history WHERE action = 'purchased';
hive> INSERT OVERWRITE TABLE credits SELECT * FROM history WHERE action = 'returned';
and Query B:
hive> FROM history
INSERT OVERWRITE sales SELECT * WHERE action = 'purchased'
INSERT OVERWRITE credits SELECT * WHERE action = 'returned'
Which of them will make a single pass through?
I don't know if query B will even compile. There is no 'select * from table_name'. What is single pass through? Can somebody please explain this concept in detail taking above query as an example?