티스토리 뷰

공부

[Spark] collect_list order by

승가비 2020. 8. 21. 22:49
728x90

DISTRIBUTE BY

SORT BY

 

https://stackoverflow.com/questions/45092576/how-to-use-order-by-with-collect-set-operation-in-hive?noredirect=1&lq=1

 

how to use order by with collect_set() operation in hive

In Table 1, I have customer_id, item_id and item_rank (rank of item according to some sales). I want to collect a list of items for each customer_id and arrange them according to item_rank.

stackoverflow.com

 

728x90
댓글