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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
vidya821
Creator
Creator

Extract Difference Data from two files

Hi All,

 

Is it possible to extract the difference data from tFileCompare ?

 

One approach to compare is LookUp (but i have different set of files to compare and each set has different headers, so for lookup i need to modify the file schema everytime), is there any component to compare two files and get the difference data as output directly ?

 

Thanks

Labels (2)
16 Replies
Anonymous
Not applicable

That is not possible. When you do that in Oracle it is fully aware of the schemas (although they have to be same....which you were saying is not necessarily the case here). You can do that with Talend in your database component (if both tables are in the same database), but this is not the case....or is it? If it is the case, just replace the table names with context variables. However if it is not the case, the solution I gave you is not complicated at all. I believe you can make it completely dynamic if you have enough permissions on your database user.

vidya821
Creator
Creator
Author

No, the tables are in different databases.
Will try to implement the solution suggested by you.
Thanks
vidya821
Creator
Creator
Author

@rhall,
1) Input your data from your tables with ALL of the columns concatenated and hashed. Output this as a String (Varchar). You will need a primary key on the table to be output as well. So your data from each table will be ....
Key
ConcatenatedHash
-- Is there any component which does the concatenation and hashing of the columns ? or how should i do it using talend

Anonymous
Not applicable

You can concatenate and hash in your Oracle query (which would help make it more dynamic). This way your job does not have to be aware of the schema, you just need to pass it an appropriate SQL query with the concatenation and hashing built in.
vidya821
Creator
Creator
Author

Thanks Rhall,
This worked perfectly fine for me,
the design to concatenate was like
-tOracleInput component to find columns for the respective tables - > tDenoramalize component to combine all the columns with separator ||'|'|| and use the same in the select queries
shindeHarshada
Contributor
Contributor

Why is concatenation and hashing needed?

shindeHarshada
Contributor
Contributor

why can't we compare 2 rows directly?