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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
dudda
Contributor
Contributor

Compare current date to yesterday and if two fields are the same then set another record to +1

OK all smart people 0683p000009MACn.png

 

I am struggling with using tMap and tJavaRow and tAggregate for the below.
What I am trying to accomplish is I am trying to look at the current date and see if yesterdays date has the same values for RuleName and AccountNumber and if it does then the field CountByKDE gets a +1 value (so if it was 0 it goes to 1, if it is 2 it goes to 3) up to the value of 5 then an email will go out.  I already have the email job done.  How do I accomplish this please help.

Chantelle

Labels (3)
1 Reply
Anonymous
Not applicable

Hi,

 

    You can store the RuleName and AccountNumber to two context variables. Similarly, store the CountByKDE  value also to the context variable. Now, in the tjavarow, write a java if condition which will match the incoming record with context variables for RuleName and AccountNumber. 

 

    If it matches, increment the current value by 1. Connect to email job with a Run if condition and inside Run if condition, check the value of CountByKDE  variable. That way, you can control the job call to email component.

 

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