Six Stars

Error while fetching data from Greenplum

I am fetching data from Greenplum using a complex SQL with multiple union in the query, and writing it to Haddop.  I am using tGreenplumInput component. While fetching data getting error

 

Exception in component tGreenplumInput_1
org.postgresql.util.PSQLException: ERROR: syntax error at or near "8"
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592)

Able to execute query successfully on using aginity but getting error with greenplum component.

How to resolve this

1 ACCEPTED SOLUTION

Accepted Solutions
Six Stars

Re: Error while fetching data from Greenplum

I am able to resolve the issue now.
It is due to '\\' used in the query. Talend is not able to understated '\\'.
Therefore instead of '\\' needs to use '\\\\' in the tGreenplumInput component.


4 REPLIES
Moderator

Re: Error while fetching data from Greenplum

Hi,

Could you please also show your complex SQL with multiple union query?

Exception in component tGreenplumInput_1
org.postgresql.util.PSQLException: ERROR: syntax error at or near "8"
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592)

Is there any compile error highlighted in red line when you check your "Code" tab in your job?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: Error while fetching data from Greenplum

Hi
here is query
https://paste.ofcode.org/WEER8iijprWNwgfrrwb675
please check it.
I have converts it to execute in talend by replacing " by \"
Six Stars

Re: Error while fetching data from Greenplum

I am able to resolve the issue now.
It is due to '\\' used in the query. Talend is not able to understated '\\'.
Therefore instead of '\\' needs to use '\\\\' in the tGreenplumInput component.


Moderator

Re: Error while fetching data from Greenplum

Hello,

Thanks for posting that you have resolved this issue by yourself.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.