Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, Sabrina. I found this post from many years ago and tried to use your suggestion to get the count of rows selected from source (which is SQL Server) by getting the value of ((Integer)globalMap.get("tDBInput_2_NB_LINE"))) and compare it with the rows inserted into destination which is tDBOutputBulkExec_1 Amazon Redshift. I get the former value in my tBufferoutput without a problem but not the latter - this one is always null. Does the tDBOutputBulkExec act differently regarding rows inserted...? Thank you
Hello,
Would you mind posting your job design screenshots on community which will be helpful for us to understand your situation very well?
Best regards
Sabrina
Thank you for considering my question, Sabrina. This is the job I am talking about - those are just straight copies from source (SQL Server to Destination - Redshift), and to check that my number of rows extracted from source matches the number of rows inserted into destination, I decided to use global variables to save each count and return it to the calling job for comparison or even use it inside the child job before committing the data to redshift. This is my design: (and I only started with Talend last month so please forgive me if I am off)
SQL Server component:
Redshift component:
now capture the output counts in tFixedFlowInput:
and this is my output to parent:
the parent job has to check where any in count not equal the out count and report it or if the child job can compare them there and not commit to redshift when counts are not equal. I have a bunch of tables like that transferring data from sql server to redshift. The parent job right now just printing out the output parameters - messgae_in_1 shows the correct count but messge_out_1 - which should be coming from redshift shows null:
thi is java code for now just to see that the main job is getting the parameters from the child:
this is the run window when I run the main job :
thank you