Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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.
Labels (2)
6 Replies
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

hello,
Can you explain please a little more because I want to do a job that will control after loading job.
Thank you very much.
Anonymous
Not applicable
Author

you can send me an exmple please?
Anonymous
Not applicable
Author

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"
Anonymous
Not applicable
Author

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.
Anonymous
Not applicable
Author

Note: I use Talend Open Studio 5.3.1, I can not find NB_LINE counters.