Page 1 of 1

Redshift Error: 1 unrecognized node type: 407

Posted: Thu 13 Feb 2020 14:37
by dburtsev
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

Re: Redshift Error: 1 unrecognized node type: 407

Posted: Fri 14 Feb 2020 10:08
by alexa
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.

Re: Redshift Error: 1 unrecognized node type: 407

Posted: Fri 14 Feb 2020 15:21
by dburtsev
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)

Re: Redshift Error: 1 unrecognized node type: 407

Posted: Mon 17 Feb 2020 13:14
by alexa
Thank you for bringing this to our attention.

We will investigate this issue and will answer you as soon as possible.