I am trying to convert the query written in MySQL to HiveQL
The part of query giving me error is :
WHERE 1 = 1
AND table1.incoming_date >= DATE_SUB(DATE_SUB(CURDATE(),INTERVAL DAY(CURDATE()) - 1 DAY),INTERVAL 3 MONTH)
Most probably it is because INTERVAL is not supported in Hive with DATE_SUB().
So, can someone convert this part for me.
Error:
ParseException:
extraneous input 'DAY' expecting {')', ','}(line 179, pos 60)
Copyright Notice:Content Author:「Prakul」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/63394826/error-in-mysql-to-hiveql-conversion-including-date-sub-and-interval