HiveSQL行轉列lateral view explore()以及連接concat_ws()和列轉行collect_list()&collect_set()區別的使用案例

行轉列: 在我們使用hive進行數據統計分析時可能有這麼一個場景: 一行數據中,一個字段中有很多和數據項,我們需要對每個數據項進行一個統計分析。 例如:一個人有很多人生的重要階段,我們有一批人,求在某個階段的人的總數 uid,stage 1,jiehun:shengzi:maiche 2,maiche:maifang 3,maifang:jiehun 4,dushu:maiche 5,dushu:
相關文章
相關標籤/搜索