Oracle $__timeFilter replaced by macro is not working

Hello All,
It seems the __timeFilter macro is adding extra quotes("") for the date/time field, which is causing the query to fail on oracle. When I Just removed the quotes the generated query runs fine on the DB.

Query Generated with error ORA-00904: “Time”: invalid identifier*

  • select Time as time , values as value from SPLUNK_Redemp where “Time” BETWEEN TO_DATE(‘19700101’,‘yyyymmdd’) + (1/24/60/60/1000) * 1564509947046 AND TO_DATE(‘19700101’,‘yyyymmdd’) + (1/24/60/60/1000) * 1567101947046 order by time asc

Oracle doesn’t like it, so if i change the query to below, then it works.
select Time as time , values as value from SPLUNK_Redemp where Time BETWEEN TO_DATE(‘19700101’,‘yyyymmdd’) + (1/24/60/60/1000) * 1564509947046 AND TO_DATE(‘19700101’,‘yyyymmdd’) + (1/24/60/60/1000) * 1567101947046 order by time asc

Is there any way we can avoid macro adding the additional quotes to the time field?

Thanks.

1 Like

are you able to use any of the macro yet as i am still not able to work with those.