apache pig - Extract day,month,time of the day from date using Pig -


input format : mon, 09/20/10 01:04 pm

have extract day,month,time of day. i'm aware of inbuilt functions getday,getmonth,e.t.c

but im getting following error while using it

could not infer matching function org.apache.pig.b
uiltin.getmonth multiple or none of them fit. please use explicit cast.

even tried getmonth(todate(date))... of no use

simple usage of todate() assumes date string in iso format, yours not. need provide function format string describes date format. see https://pig.apache.org/docs/r0.15.0/func.html#to-date details.

something like

todate(date, 'e, m/d/y k:m a') 

should work.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -