Reply
Highlighted
New Contributor
Posts: 1
Registered: ‎12-28-2018

How to generate the hourly table for a particular date range in Hive?

I would like to generate the hour series for a particular date range in tabular format by passing the start date and end date as arguments.

 

Eg: If I pass start date as 2018-12-01 and end date as 2018-12-03 , it should produce the below result:

date                     Hour

-------------------------------------

2018-12-01          0

2018-12-01          1

2018-12-01          2

.                            .

.                            .

.                            .

.                            .

2018-12-03          23

Announcements