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

[resolved] need help records are inserted/updated

Hi,
I need a help to how to send a mail with how many records are inserted/updated in specific table. I design the job but unable to achieve the functionality.
could you please help me.
thx
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,
If you set the Action on data on DB is "Update or Insert", there is a Key schema needed for this table.
Perhaps the tsendmail message body should be :
"The inserted number"+((Integer)globalMap.get("tMysqlOutput_1_NB_LINE_INSERTED"))+"The Updated number"+((Integer)globalMap.get("tMysqlOutput_1_NB_LINE_UPDATED"))

Best regards
Sabrina

View solution in original post

8 Replies
alevy
Specialist
Specialist

Connect tSendMail with OnComponentOK from the second tOracleOutput or with OnSubjobOK from the first tOracleInput.
Anonymous
Not applicable
Author

Hi,
In addition, Nb_LINE is used to count the total number of records have been proceed. When inserted item is choosen, there will be a global variale such as ((Integer)globalMap.get("tOracleoutput_1_NB_LINE_INSERTED")) will be avaible, which counts the total number of records have been inserted into database. The same to updated, deleted items.
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi,
In tsendmail message body i have to use global variable ((Integer)globalMap.get("tOracleoutput_1_NB_LINE_INSERTED")). Could you please help me.

Thx
Anonymous
Not applicable
Author

Hi,
You can set the expression of body as:
""+((Integer)globalMap.get("tMysqlOutput_1_NB_LINE_INSERTED"))
or
"The total number of processed files is: "+((Integer)globalMap.get("tMysqlOutput_1_NB_LINE_INSERTED")).
String.valueOf((Integer)globalMap.get("tMysqlOutput_1_NB_LINE_INSERTED")) is also Ok.
See my screenshot
Best regards
Sabrina
0683p000009MEgC.png
Anonymous
Not applicable
Author

Hi sabrina,
Thanks for inputs. however i want to use a single tsendmail component and in that message body i have to use no. of records inserted and no. of records updated. Is it possible?
could you please help me.
Thx
Anonymous
Not applicable
Author

Hi,
Thanks for inputs. however i want to use a single tsendmail component and in that message body i have to use no. of records inserted and no. of records updated. Is it possible?

no.of record inserted and no. of records updated? How did you set your DB "Action on data" if you want both of them? Could you please elaborate your case with an example with expected output values?
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi sabrina,
Yes. I want both of them. I set the Action on data on DB is "Update or Insert". So i want to capture no. of records inserted and no.of records updated in tsendmail message body. could you please advise or help me.
Thx,
Anonymous
Not applicable
Author

Hi,
If you set the Action on data on DB is "Update or Insert", there is a Key schema needed for this table.
Perhaps the tsendmail message body should be :
"The inserted number"+((Integer)globalMap.get("tMysqlOutput_1_NB_LINE_INSERTED"))+"The Updated number"+((Integer)globalMap.get("tMysqlOutput_1_NB_LINE_UPDATED"))

Best regards
Sabrina