• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Commit every... with existing connection

#1 2008-05-14 23:25:42

timson1
Guest

Commit every... with existing connection

I am trying to load data into oracle using TOS 2.3.3.

1) I have main connection that goes from my file to tOracleOutput.
2) I use the existing connection.
3) I want to commit every 10000 rows.

Is there a way to implement this kind of load in Talend?
I understand that I can do it if I don't use existing connection (there is a Commit Every... field on the Advanced Settings tab, but it disappears when I switch to "use existing connection"). Why can't I do it with the existing connection? Is there a reason or am I missing something?

#2 2008-05-15 00:15:42

plegall
Member
Registered: 2006-09-19
Posts: 1586
Website

Re: Commit every... with existing connection

timson1 wrote:

Why can't I do it with the existing connection? Is there a reason or am I missing something?

It's a design choice from us the developers. tOracleConnection/tOracleCommit/tOracleRollback where designed so that user can control the transactions.

Workaround:

tFileInputDelimited --row--> tOracleOutput --row--> tFilterRow --row--> tOracleCommit

in the tFilterRow, advanced mode:

Code:

sequence('abcd', 1, 1) % 10_000 == 0

Don't forget to add a tOracleCommit after the subjob, so that last lines are commited.

May I ask you to add a feature request "add a commit every in t*Commit"? I think it would be much more user friendly than the tip I just gave you.

Offline

#3 2008-05-15 15:46:43

timson1
Guest

Re: Commit every... with existing connection

plegall wrote:

timson1 wrote:

Why can't I do it with the existing connection? Is there a reason or am I missing something?

It's a design choice from us the developers. tOracleConnection/tOracleCommit/tOracleRollback where designed so that user can control the transactions.

Workaround:

tFileInputDelimited --row--> tOracleOutput --row--> tFilterRow --row--> tOracleCommit

in the tFilterRow, advanced mode:

Code:

sequence('abcd', 1, 1) % 10_000 == 0

Don't forget to add a tOracleCommit after the subjob, so that last lines are commited.

May I ask you to add a feature request "add a commit every in t*Commit"? I think it would be much more user friendly than the tip I just gave you.

Excellent! I will use this trick for now and wait for the new feature.
Submitted [Bugtracker, feature 3797, open] Add Commit Every... to tOracleCommit component

#4 2011-12-01 11:26:35

predictor
New member
Registered: 2011-05-23
Posts: 5

Re: Commit every... with existing connection

How to perform such trick with java tFilterRow?

Offline

#5 2011-12-01 15:00:50

YvesT
Guest

Re: Commit every... with existing connection

Hi,

In tFilterRow, Advanced:

Numeric.sequence("abcd", 1, 1) % 500 == 0

Kind regards,
Yves

#6 2011-12-02 05:23:40

predictor
New member
Registered: 2011-05-23
Posts: 5

Re: Commit every... with existing connection

YvesT wrote:

Numeric.sequence("abcd", 1, 1) % 500 == 0

It works.
Thank you very much!

Offline

#7 2012-03-21 09:45:45

wani0102
New member
Registered: 2012-02-22
Posts: 7

Re: Commit every... with existing connection

what is "abcd"?

Offline

#8 2012-03-21 10:07:10

janhess
Member
Company: Newcastle University
Registered: 2009-05-19
Posts: 1123

Re: Commit every... with existing connection

The first 4 letters of the alphabet.

Actually it's the sequence reference name.

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Commit every... with existing connection

Board footer

Powered by FluxBB