문제

I need to periodically load files from local file system into hdfs and update hive table partitions. The query for updating the partitions depends on the

timestamps(select * where date = "").

Could use Oozie EL but I need todays and yesterday's date. Moreover I don't understand how to capture date and pass it as a parameter into hive script.

How do I Do this, any ideas ?

도움이 되었습니까?

해결책

you could write a coordinator.xml and use it's date functions

${coord:dateOffset(coord:nominalTime(), -1, 'DAY')}

docs here: http://oozie.apache.org/docs/3.3.2/CoordinatorFunctionalSpec.html#a6.7.3._coord:nominalTime_EL_Function

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top