I'm very new on Talend Open Studio for Data Integration version 7. I have a query that throws an error. How do you resolved reserved words in the query that runs throus tPostgresqlRow?
Select "current_schema", src_id from src_table
Thanks in advance!
You need to escape the double quotes that you use to escape the reserved words. So, something like this....
"Select \"current_schema\", src_id from src_table"
The reason for this is that the queries used in Talend are actually Java Strings. Java Strings are surrounded by double quotes. To include a double quote, you need to escape it with a \.
I also have a followup question.
In tDBInput_1, I select all current_schema and src_sys_id and pass it through tFlowtoIterate_1. Then I have tDBInput_4 that selects my input table and use the current_schema from tDBInput_1. Whenever I run this, it's always null. I'm going crazy figuring this out.
There are a couple of things wrong where you use your globalMap. First of all, the tFlowToIterate names the globalMap key using the row that feeds it and the column name. The row that feeds it is row4 not row1. The other issue is that you will need to cast that value from Object. The globalMap will default all objects to Object. To do this, just use the following code....
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Learn how to do cool things with Context Variables
Find out how to migrate from one database to another using the Dynamic schema
Pick up some tips and tricks with Context Variables