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: 
Anonymous
Not applicable

Need help on how to find the no of rows inserted/updated/deleted.

Hi Team,
I am using fileInputDelimeted -> tmap -> tOracleOutput, can any one please let me know how to check no of rows inserted/updated/deleted in this way.
Thanks & Regards,
Rajendra Lella.
Labels (2)
17 Replies
Anonymous
Not applicable
Author

Why do you need tMap in between, besides, you can have simple flow like
tinputfileA-->tableA in one talend job and other flows in other jobs
Call all these jobs in single master job and use sendmail component on OnSubjobOk link...
or use
tinputfileA-->tableA 
|
OnSubjobOk 
|
tinputfileB-->tableB 
etc...
It is not a good idea to use tMap if you don't have any lookups..
Vaibhav
Anonymous
Not applicable
Author

Hi,
From your description, you can use onSubjobOk connector to trigger tsendmail .
The workflow should be:
tinputfileA    \                    /    tableA
tinputfileB    _    tmap     ->   tableB
tinputfileC   /                      \  tableC
            |       |                  
    OnSubjobOk    OnSubjoberror
         /                      \
      tsendmail                          tsendmail
Here is a related forum: https://community.talend.com/t5/Design-and-Development/Message-in-Talend-Stats-quot-success-quot-eve...
Hope it will be helpful for you. Or do you want to send an email with number of inserted/updated/deleted rows?
Best regards
Sabrina

Hi Sabrina,
Thanks for your valuable help and support,
Please find the details,
I have 18 jobs to be executed, I learnt that the jobs can be executed one by one by making use of on job ok,
Please find my query,
Job 1 has executed successfully and it has inserted 20 rows in table1
Job 2 has executed successfully and it has inserted 2 rows in table2
Job 3 has executed successfully and it has inserted 10 rows in table3
Now I have to consolidate the details and send an e-mail, which should be as below
Job1,
Inserted 20 rows in table1
Job2,
Inserted 2 rows in table2
Job3,
Inserted 10 rows in table3
How can I track all jobs information and populate it in tSendMail?
Please could you help me on these lines?
Thanks for your valuable help and support.
Regards,
Rajendra Lella,
Anonymous
Not applicable
Author

Can any one help me ??
Anonymous
Not applicable
Author

Hi,
From your description, you can use onSubjobOk connector to trigger tsendmail .
The workflow should be:
tinputfileA    \                    /    tableA
tinputfileB    _    tmap     ->   tableB
tinputfileC   /                      \  tableC
            |       |                  
    OnSubjobOk    OnSubjoberror
         /                      \
      tsendmail                          tsendmail
Here is a related forum: https://community.talend.com/t5/Design-and-Development/Message-in-Talend-Stats-quot-success-quot-eve...
Hope it will be helpful for you. Or do you want to send an email with number of inserted/updated/deleted rows?
Best regards
Sabrina

Hi Sabrina,
Thanks for your valuable help and support,
Please find the details,
I have 18 jobs to be executed, I learnt that the jobs can be executed one by one by making use of on job ok,
Please find my query,
Job 1 has executed successfully and it has inserted 20 rows in table1
Job 2 has executed successfully and it has inserted 2 rows in table2
Job 3 has executed successfully and it has inserted 10 rows in table3
Now I have to consolidate the details and send an e-mail, which should be as below
Job1,
Inserted 20 rows in table1
Job2,
Inserted 2 rows in table2
Job3,
Inserted 10 rows in table3
How can I track all jobs information and populate it in tSendMail?
Please could you help me on these lines?
Thanks for your valuable help and support.
Regards,
Rajendra Lella,
Can any one help me in this regards...?
Anonymous
Not applicable
Author

inside tSendMail component you can use following

"Inserted "+(Integer)globalMap.get("tMSSqlOutput_1_NB_LINE_INSERTED")+ rows in "+table1"+"\n"+
Inserted "+(Integer)globalMap.get("tMSSqlOutput_2_NB_LINE_INSERTED")+ rows in "+"table2"+"\n"+
"Inserted "+(Integer)globalMap.get("tMSSqlOutput_3_NB_LINE_INSERTED")+ rows in "+"table3""\n"+
etc
(Integer)globalMap.get("tMSSqlOutput_3_NB_LINE_INSERTED") - this variable you can get using Ctrl+Space for respective output database component.
Vaibhav
Anonymous
Not applicable
Author

Thanks Vaibhav for your help and support.
I will try given scenario and will let you know in case if I find any issues..
Anonymous
Not applicable
Author

hai XDSHI
Generate 100 records using trowgenerator and load the data into the db
While loading into db there must be two flows one for insertion and other for updating  the existing records in the db.
Output requirement:
Capture the following details for that job in separate tables,
a.        Job start time
b.       Job end time
c.        No of records inserted
d.       No of records updated
e.       No of records deleted
f.         Duration 

Help me to get this output
Anonymous
Not applicable
Author

Hi prabhakaran,
We usually use Nb_LINE 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("tDBOutput_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.
 
Here is a tstatCatcher component which is used to gather the Job processing metadata at the Job level and at the component level.
Please take a look at this component reference.
https://help.talend.com/search/all?query=tStatCatcher&content-lang=en

Best regards
Sabrina