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

How to know number of records inserted successfully to database

Hello Team,

 

Currently i have a job which inserts records from Excel to Database.

To ensure records are entered into database i used below in tFixedFlowInput component :

 

((Integer)globalMap.get("tPostgresqlOutput_1_NB_LINE"))
((Integer)globalMap.get("tPostgresqlOutput_1_NB_LINE_UPDATED"))
((Integer)globalMap.get("tPostgresqlOutput_1_NB_LINE_INSERTED"))
((Integer)globalMap.get("tPostgresqlOutput_1_NB_LINE_DELETED"))
((Integer)globalMap.get("tPostgresqlOutput_1_NB_LINE_REJECTED"))

 

But it gives output as :

 

tLogRow_1 |
|=----+-------+--------+------=|
|count|updated|inserted|deleted|
|=----+-------+--------+------=|
|28336|0 |15027 |0 |

 

But no records are entered into database due to some error.So why such incorrect information?

 

Thanks & Regards,

Arvind Kumar Jha

Labels (2)
5 Replies
cterenzi
Specialist
Specialist

Which database components are you using? Check the Advanced settings tab for your component. You may need Auto Commit enabled or else explicitly commit your transaction.
Anonymous
Not applicable
Author

I am using postgresql and there is no option as AutoCommit :

0683p000009LucL.png

cterenzi
Specialist
Specialist

Ok, so that component should commit after every 10 rows. You mentioned an error in your original post. Do you get an error or other type of message when your job runs?
Anonymous
Not applicable
Author

Hi,

Is your DB connection Ok with you? Is there any row rejected by your component tPostgresqlOutput? Can see your any data processing rate(rows/s) when execute your job?

Best regards

Sabrina

jilanisyed
Creator
Creator

Hi Arvind,

I believe the records are passing to the target component but the data has not committed. please try  to use tpostgresconnection component in the connection component  advance setting please check the auto commit option or use tpostgresscommit component to commit the data into postgress table.


2017-07-07_17h52_14.png