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: 
_AnonymousUser
Specialist III
Specialist III

send row count though mail

Hi Team,
I have need help, i have two target table. for example: EMP, DEPT.
tinputexcel1-->tmap--->toracleoutput(EMP).
tinputexcel2-->tmap--->toracleoutput(DEPT). 
i need to send mail, count of both table with filter condition.
select count(*) from emp where flag='m';
select count(*) from emp where flag='U';
select count(*) from dept where flag='m';
select count(*) from dept where flag='U';
---- email BODY:--------------
Source file name: emp
Matched count: 4
Unmatched count:2
Total records:6
Source file name: DEPT
Matched count: 6
Unmatched count:2
Total records:8
using context variable or any option.
Kindly help me this scenario. i am new to this ETL.

Thanks
shridhar

Labels (2)
1 Reply
Anonymous
Not applicable

select count(*) from emp where flag='m';

You can use tOracleInput to execute a select statement and store the result to context variable for used later, eg:
tOracleInput--main--tJavaRow
on tOracleInput: define a column called 'nb_emp_m' with int type, set the query as " select count(*) from emp where flag='m'"
on tJavaRow:
context.nb_emp_m=input_row.nb_emp_m.
//the same process for other counts.
In the end of job, use a tSendMail to send an email, the message is defined as below for example:
" Source file name: emp"+"\n"+" Matched count:"+context.nb_emp_m+"\n"+" Unmatched count:"+(other string...)

Regards
Shong