Job control: Control the number of lines with talend
Hello,
I have a source table and a target table must have the same number of lines. So I want to create a job control that compares two tables and it gets error if there is a difference. Please how can I do with Talend Open Studio?
Thank you in advance.
Hi, I think you are looking for "Sync". For community version, you can use "incremental load" by contrasting source table and target table. The workflow should be : targettable-->mainrow-->tMap-->rejectrow-->output sourcetable-->lookuprow Join the two tables and make inner join on tMap. Set "catch lookup inner join reject " as true and the changed date is the unassociated data by inner join. Best regards Sabrina
All input and output components provides counters of type Integer like tOracleInput_NB_LINE. All these counters can retrieved by drag & drop from the Outline view.
You can use the NB_LINE counters to compare the amount of input with the output.
Example for tWarn message:
((Integer) globalMap.get("tOracleInput_NB_LINE")).equals(((Integer) globalMap.get("tOracleOutput_NB_LINE"))) ? "is equal" : "is NOT equal"
Thank you very much for your help. I'm starting with Talend. How can I put the message you gave me in the tWarn? I have MySQL tables, so how I can use tMySqlInput_NB_LINE. Is that you can send me the pattern of Job please because I'm stuck? Thank you in advance.