Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Generate BATCH_ID on increment with one for every job execution

Hello,
 
I'm new to Talend studio and I have scenario where I need to generate the batch_ID by doing curr_val + 1 and update the value in the oracle table with the latest  batch_id.In Talend I'm looking for a component where it looks for the current batch_id and then increment by one and then update the value in the relational table.

Thanks in advance!
Labels (3)
17 Replies
Anonymous
Not applicable
Author

I'm using the Numeric.sequence("s1",1,1)  in the tmap expression and the value is not getting updated in the database table
Attached is the screenshot for the tmap expression that I'm using.Please correct me if anything is wrong.
Can anyone please help me


Thanks,
Anonymous
Not applicable
Author

There is no screenshot?
Anonymous
Not applicable
Author

Please find the attached screenshot
  0683p000009MBpW.png
Thanks!
Anonymous
Not applicable
Author

That looks OK. You will need to show us the DB component you are using to update the database and how it is configured.
Anonymous
Not applicable
Author

Hi,
Attached is the screenshot for DB component.

  0683p000009MBpb.png


0683p000009MBpg.png
Thanks!
Anonymous
Not applicable
Author

It shows you are updating your db table. What is your lookup key? This should be set on the Advanced Settings tab
Anonymous
Not applicable
Author

Hi,
Just now I did configured the lookup key in the additional columns.
Can you please let me know if we need to SQL expression as well.Thanks!
   0683p000009MBpl.png
Anonymous
Not applicable
Author

Are you wanting to update or insert here? I am not clear. The update you have done is wrong. You want to remove that. If you want to set an update key, you need to tick the "Use field options" tick box and select the update key from there.
But I am not convinced you want to be doing an update here. I think you want to be inserting.
Anonymous
Not applicable
Author

Hi,
I did removed the additional columns and choosed the optional fields in the below.I need to update currval to 2(right now it is one).Even I executed the job and the currval is not getting updated. Thanks for your help Sir! 
Can you please correct me if anything is wrong!
Attached is the screenshot. 
0683p000009MBK3.png

Database table
0683p000009MBo0.png