Five Stars

Invalid Character Constant Inside tRedshiftRow Component.

I have the following Redshift Code -

select '"'||N.Name||'"' from (select cast('Sample' as varchar) as Name) N

Which gives the following output -

"Sample"

 

When i try to write this in the query part of the tRedshiftRow Component. It gives the Invalid Character Constant Error.

I checked the java code part and confirmed that the error lies near the " || " (double pipe) symbol.

 

How do i handle this error ?

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

Re: Invalid Character Constant Inside tRedshiftRow Component.

Try this
"select '\"'||N.Name||'\"' from (select cast('Sample' as varchar) as Name) N"
----------------------------------------------------------
Talend | Data Agility for Modern Business
2 REPLIES
Community Manager

Re: Invalid Character Constant Inside tRedshiftRow Component.

Try this
"select '\"'||N.Name||'\"' from (select cast('Sample' as varchar) as Name) N"
----------------------------------------------------------
Talend | Data Agility for Modern Business
Five Stars

Re: Invalid Character Constant Inside tRedshiftRow Component.

That worked ! I thought the error was the the pipe symbol. Never realized that it was the double quotes that was causing it.

 

Thank you