Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm new to Talend. I'm using Talend open studio.
I have table in redshift which stores queries(DDL, DML) in a column. I want to bring that query column in Talend and execute them one by one.
If there is any error i want to save in a table and also want to write success/failure status to Redshift table.
Thanks
Hello,
You can use tFlowToIterate to iterate each row which stores queries(DDL, DML) and a variable in the query of tMysqlInput_2.
The job design should be: tMysqlInput_1--row1-->tFlowToIterate---->iterate-->tMysqlInput_2--->output
Best regards
Sabrina
Thanks Sabrina. I'm totally new in this area, could you please able to draw a rough design in studio and send me image.
Appreciate for your help
a simple job design is as below.
tRedshiftInput--main(row1)--tFlowToIterate--tRedshiftRow
in the Query field:
(String)globalMap.get("row1.query")
Note: query is the column name defined on the schema of tRedshiftInput.
Please make some testings and see if you are able to read the query from table and execute it on tRedshiftRow one by one.
Regards
Shong
Thanks Shong.
My job is now running fine but when any error happen then tRedshiftRow is not going to OnComponentError side. For testing i'm inserting a row into a table that don't exist and expecting tRedshiftRow trigger onComponentError. I added image of my job below. Basically i want to update audit table. If query execute fine then i want that update audit table as success and if query fail then mark that particular query record as failed. Thanks