Grouping sets, Rollup and cube

Hello everyone. We have used GROUP BY operation to perform aggregations in our queries. Consider the case where we have data with of retail store inventory. Every month, we have shipped products to different stores with different product types like clothing, home appliances etc. Now we want to calculate that how many products have we shipped to each store according to…

Continue Reading

Pivot rows to columns in Hive

Hello everyone. In this article, we will learn how can we pivot rows to columns in Hive. Pivoting/transposing means we need to convert a row into columns. We need to do this to show different view of data, to show aggregation performed on different granularity than which is present in the existing table. Consider you have following data from some company. It shows how…

Continue Reading

Collect_set and Collect_list in hive

Hello all, welcome to another article on Apache Hive. In this article, we will see how can we use COLLECT_SET and COLLECT_LIST to get a list of comma separated values for particular column while doing grouping operation. While doing hive queries we have used group by operation very often to perform all kinds of aggregation operations like sum, count, max etc. Consider…

Continue Reading
  • 1
  • 2
Close Menu