This query works:
SELECT CONVERT_TIMEZONE('America/New_York', sae.event_time) AS local_time, sae.*
FROM stl_alert_event_log sae
WHERE
(sae.event_time > CONVERT_TIMEZONE('America/New_York', 'UTC', (SELECT DATEADD(hrs, 9, TRUNC(GETDATE()))))
AND sae.event_time < CONVERT_TIMEZONE('America/New_York', 'UTC', (DATEADD(hrs, 18, TRUNC(GETDATE())))))
This return an error:
SELECT CONVERT_TIMEZONE('America/New_York', sae.event_time) AS local_time, sae.*
FROM stl_alert_event_log sae
WHERE
(sae.event_time > CONVERT_TIMEZONE('America/New_York', 'UTC', (SELECT DATEADD(hrs, 9, TRUNC(GETDATE()))))
AND sae.event_time < CONVERT_TIMEZONE('America/New_York', 'UTC', (DATEADD(hrs, 18, TRUNC(GETDATE())))))
ORDER BY sae.event_time
Redshift Error: 1 unrecognized node type: 407
Re: Redshift Error: 1 unrecognized node type: 407
The error is returned by the Redshift server itself.
You could try performing this in some other tool to see if there is any difference.
You could try performing this in some other tool to see if there is any difference.
Re: Redshift Error: 1 unrecognized node type: 407
Only your tool have this problem.
I tested it with:
Aginity Workbench for Redshift and HeidiSQL
You can test it with command line tool psql.exe:
C:\PostgreSQL\bin>set PGCLIENTENCODING=UTF8
C:\PostgreSQL\bin>set PGPASSWORD=xyz
C:\PostgreSQL\bin>psql.exe -f C:\\PostgreSQL\\bin\\query.sql "host=redmocs.xyz.us-east-1.redshift.amazonaws.com user=xyz dbname=xyz port=5439 "
local_time | user_name | query_text | event | solution | query_millisec
------------+-----------+------------+-------+----------+----------------
(0 rows)
I tested it with:
Aginity Workbench for Redshift and HeidiSQL
You can test it with command line tool psql.exe:
C:\PostgreSQL\bin>set PGCLIENTENCODING=UTF8
C:\PostgreSQL\bin>set PGPASSWORD=xyz
C:\PostgreSQL\bin>psql.exe -f C:\\PostgreSQL\\bin\\query.sql "host=redmocs.xyz.us-east-1.redshift.amazonaws.com user=xyz dbname=xyz port=5439 "
local_time | user_name | query_text | event | solution | query_millisec
------------+-----------+------------+-------+----------+----------------
(0 rows)
Re: Redshift Error: 1 unrecognized node type: 407
Thank you for bringing this to our attention.
We will investigate this issue and will answer you as soon as possible.
We will investigate this issue and will answer you as soon as possible.