Five Stars

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

5 REPLIES
Ten Stars

Re: How to know number of records inserted successfully to database

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.
Five Stars

Re: How to know number of records inserted successfully to database

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

PostgreSQL.PNG

Ten Stars

Re: How to know number of records inserted successfully to database

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?
Moderator

Re: How to know number of records inserted successfully to database

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

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: How to know number of records inserted successfully to database

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.