1

I am trying to use SYS_CALENDAR.CALENDAR in Hive. It works for Oracle SQL but how can we convert so that I can run following in Hive:

SELECT * FROM SYS_CALENDAR.CALENDAR;
leftjoin
  • 36,950
  • 8
  • 57
  • 116
Dinesh Madhup
  • 337
  • 8
  • 21

1 Answers1

1

SYS_CALENDAR.CALENDAR is a Teradata system view, not Oracle. There is no such table or view in Hive, but you can generate it or write a subquery in Hive which will return what you need.

See these questions:

How can i generate a Date table with fields equals to "Dayofweek", "weekofyear" etc ;and rows equals to date from 2010-01-01 till current_date

https://stackoverflow.com/a/56071699/2700344

Alternatively you can load data from TD into Hive using Sqoop or export it into CSV then load into Hive table.

leftjoin
  • 36,950
  • 8
  • 57
  • 116