Empty Result using Database Reader legacy node and Impala Database

Hi, i created a workflow with impala database.
On the “Database Reader (legacy)” node, I entered the query “select * from prd_sri_datalake.sri_300_300_monitoring_daily order by date_process desc” and it worked as shown below.

image

But when I enter the query “select * from prd_sri_datalake.sri_300_300_monitoring_daily where date_process = now()” then the data doesn’t show and the following notification appears.

image

image

here’s what my workflow looks like

Is the date format on Database Reader (legacy) node different? Do I have to add another node? and what nodes?
Please help

@alvoholic I think NOW() in Impala would return the current date snd time when your column might just contain a date. Maybe you try CURRENT_DATE(). Be aware that some date and time functions for Hive might differ.

https://impala.apache.org/docs/build/html/topics/impala_datetime_functions.html#datetime_functions__now

NOW()
Purpose: Returns the current date and time (in the local time zone) as a TIMESTAMP value.

https://impala.apache.org/docs/build/html/topics/impala_datetime_functions.html#datetime_functions__current_date

CURRENT_DATE()
Purpose: Returns the current date.

I’ve replaced with current_date() but the result is like this

Mayby try this:

from_timestamp(now(), ‘yyyy-MM-dd’)

SELECT 
  from_timestamp(now(), 'yyyy-MM-dd') AS today
, from_timestamp(DATE_SUB(now(), INTERVAL 3 days), 'yyyy-MM-dd') AS three_days_ago

solve using where CAST(date_process AS DATE FORMAT ‘YYYY-MM-DD’) = cast(now() as DATE FORMAT ‘YYYY-MM-DD’). thankyou for your help

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.