Hi All
Kettle 7 , MS-SQL 2014
I copied sqljdbc4.jar to \Lib folder
So connection to Ms-SQL works OK.
Use batch update for inserts
It does not depends whether this checked are not.
Result is SAME.
(I expeceted :
if it is checked and on record of batch is bad (falls due to constrints) whole batch will be DISCARDED.)
I checked it be result and also seeing SQLs in Profiler.
exec sp_execute 3,N'gjee-desc',N'PRD-OGP',396.69999999999999,N'O',998
go
exec sp_execute 3,N'slnp-desc',N'PRD-JEC',248.09999999999999,N'A',999
go
exec sp_execute 3,N'qnfy-desc',N'PRD-ICU',848.79999999999995,N'U',1000
go
... - portion on <commit size> value in Table Output.
IF @@TRANCOUNT > 0 COMMIT TRAN
from Help:
Note: There are limiting factors depending on the used database type and further step options. The batch mode is only used when this check box is selected
1.and the Commit Size is greater than 0
2.and the Return auto-generated key option is not enabled
3.and the transformation is not enabled to use unique connections (Transformation settings / Misc / Make the transformation transactional)
4.and the following rule is false: the database type supports safe points and step error handling is enabled
(see the database feature list to check if the database supports safe points)
5.and the database type supports batch updates (see the database feature list to check this)
1.2.3 - are OK
4. ???? - not sure
It can be problem of JDBC driver ( not support batch updates ???? )
How Batch should work for MS-SQL ?
Screen attached.
ps Generally this behavior is OK for me
(All bad records can be dircted to error output)
but I want to understand how it works.
Kettle 7 , MS-SQL 2014
I copied sqljdbc4.jar to \Lib folder
So connection to Ms-SQL works OK.
Use batch update for inserts
It does not depends whether this checked are not.
Result is SAME.
(I expeceted :
if it is checked and on record of batch is bad (falls due to constrints) whole batch will be DISCARDED.)
I checked it be result and also seeing SQLs in Profiler.
exec sp_execute 3,N'gjee-desc',N'PRD-OGP',396.69999999999999,N'O',998
go
exec sp_execute 3,N'slnp-desc',N'PRD-JEC',248.09999999999999,N'A',999
go
exec sp_execute 3,N'qnfy-desc',N'PRD-ICU',848.79999999999995,N'U',1000
go
... - portion on <commit size> value in Table Output.
IF @@TRANCOUNT > 0 COMMIT TRAN
from Help:
Note: There are limiting factors depending on the used database type and further step options. The batch mode is only used when this check box is selected
1.and the Commit Size is greater than 0
2.and the Return auto-generated key option is not enabled
3.and the transformation is not enabled to use unique connections (Transformation settings / Misc / Make the transformation transactional)
4.and the following rule is false: the database type supports safe points and step error handling is enabled
(see the database feature list to check if the database supports safe points)
5.and the database type supports batch updates (see the database feature list to check this)
1.2.3 - are OK
4. ???? - not sure
It can be problem of JDBC driver ( not support batch updates ???? )
How Batch should work for MS-SQL ?
Screen attached.
ps Generally this behavior is OK for me
(All bad records can be dircted to error output)
but I want to understand how it works.