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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
mani1304
Creator
Creator

Comparing two files and incrementing values

Hi All,

We have 2 input files(today's file and previous day file) and both having two columns(ani and count), ani column has values and count is simply how many times ani column value repeated, e.g. if in ani column value is abc repeated 3 times then it's count would be 3 and we have an output file having 5 columns as total_ani, same_day_repeat, next_day_repeat, frequency_same_day_repeat, frequency_next_day_repeat6

now the requirement is like if today's file count is greater than 1, then we will count it in same_day_repeat column, e.g. if abc has 3 counts, def has 4 counts, ghi has 5 counts, jkl has 2 counts, mno has 1 count, then same_day_repeat will have 4(mno count is only 1, so not taken) similarily it is matching with previous day file and having count of next_day_repeat, e.g. abc is present in previous day file, def is in previous day file, mno in previous day file, then next_day_repeat is 3 and total_ani is simply the count of ani column numbers(in the above example it is 5 and frequency can be taken as same_day_repeat/total_ani(4/5), next_day_repeat/total_ani(3/5).

Can someone suggest, how can I perform this in talend or any java code for this. I am new to both, so any help would be appreciable.

Labels (3)
1 Reply
Anonymous
Not applicable

Hi,

 

    Could you please explain the scenario with some sample records and also specify the expected output for the same sample record.

 

    Sometimes, when you are trying to explain with a sample record, you might get the solution yourself.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂