Hive date dim - Customise week no

13 views
Skip to first unread message

Kunal D

unread,
Jun 10, 2017, 8:10:37 AM6/10/17
to Hue-Users

I have to create a date dimension table which will contains following information - date , year, month , day , week of year etc details-. As per the requirement , i have to populate week of the year as per business

logic , cant use weekofyear function which automatically take january 1st as week 1-. In my case , oct 1 should be treated as week 1 and onward and dec 7 should contain last week no for the calendar year , next year again oct 1 would be treated as week1, can you please suggest how to do it using hive-.-.

Jordan Moore

unread,
Jun 24, 2017, 7:47:27 PM6/24/17
to Hue-Users
Hello Kunal, 

This seems like a Hive task, not a Hue-related issue. Perhaps you would find StackOverflow more suited towards your question. 
Regards. 

Abraham Tom

unread,
Jun 25, 2017, 9:04:22 PM6/25/17
to Hue-Users
Agree with Jordan on this that this is not a HUE issue
There are solutions to build out a CSV file from excel and using excel formulas to calculate week number based on a fixed start date
Then import the CSV to a hive defined tables (as textfile row delimiter ',') and you would have your table.   
I can share an excel template that does something simular  
Private message me at abr...@ripple.com

--
You received this message because you are subscribed to the Google Groups "Hue-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hue-user+unsubscribe@cloudera.org.

Reply all
Reply to author
Forward
0 new messages