sourceErrorMessage: ERROR: syntax error at end of input Position: XXX

Hey team! :slight_smile:

I am trying to run a custom SQL analysis (databse), by inputting the Query , and after trying to run it, it gave me this error as below:

region: us-east-1
timestamp: 1692612158121
sourceErrorCode: 0
sourceErrorMessage: ERROR: syntax error at end of input Position: 3136
sourceErrorState: 42601
sourceException: org.postgresql.util.PSQLException
sourceType: REDSHIFT

do you know what is related to?
thanks
y

What is your SQL? “ERROR: syntax error at end of input Position: 3136” is a SQL error.

Hello, cant post here due to data privacy, but this query runs perfectly on another platform we have called Hubble (I see the output and everything).

@Yohan_Trindade

Is input position 3136 at the end of your query by chance?

Hey @Yohan_Trindade , we haven’t heard from you in a few days. If you are still having an issue with this let me know, otherwise I can archive the question.

Hello @Yohan_Trindade , as you data backend is Redshift the best option is to check the query log to see the result and error in there

There are two ways of checking the last queries in Redshift:

a) Use STL_QUERY (note that he STL log views only retain approximately two to five days of log history, depending on log usage and available disk space) so you might need to reproduce the error to see it

b) Using the console, here the same applies, only recent queries will be present.

Hope this helps, otherwise I would recommend filing a case with AWS Support where we can dive into the details so that we can help you further. Here are the steps to open a support case.

If your company has someone who manages your AWS account, you might not have direct access to AWS Support and will need to raise an internal ticket to your IT team or whomever manages your AWS account. They should be able to open an AWS Support case on your behalf.

Kind regards.