cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC batch processing

former_member434498
Participant
0 Kudos

Hi Team,

Good day!


We have this requirement to download rows from the SQL table by batch.

Sample table is:

Name          Batch Sequence

A1                       1

A2                       1

A3                       1

B1                       2

B2                       2

C1                       3

C2                       3

PI should pick all rows with batch sequence "1" first and create message in PI. (After picking mark Batch Sequence with "X")

then pick the next sequence "2" then create message in PI and so on.

Each batch sequence will have separate PI message.

Is there a way to do this or control this in the JDBC channel? If yes, what would be the select statement?

Thanks,

Carlo

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member190293
Active Contributor
0 Kudos

Hi, Carlo!

In theory, you could try something like this:

SELECT BatchSeq, Name

  FROM dbo.TestTbl

WHERE

  Processed = 0 and

  BatchSeq = (Select MIN(BatchSeq) from dbo.TestTbl where Processed=0)

And your update statement should use the same WHERE class condition.

It is just a kind of "proof of concept" query and you should adopt it according to your requirements.

Another way is to use scenario with JDBC adapter acting as receiver, which is more flexible, but this depends on your integration requirements and limitations.

Regards, Evgeniy.