Invalid Character Constant Inside tRedshiftRow Component.

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


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

All 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

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.