I have a python function that passes in a HQL query into a database and I need to use hive to find (currentYear)-01-01
def foo():
return " SELECT variables \
FROM bar \
WHERE \
fizz = buzz \
AND to_date(somedate) > date_format(current_date,'yyyy-01-01') "
The last line is currently not working
CodePudding user response:
Ah embarrassing.
to_date(somedate) > date_format(current_date,'yyyy-01-01')
This works exactly as it is supposed to.