CSV to Database with increment in id column for each record

Highlighted
Five Stars

CSV to Database with increment in id column for each record

Hello, I am kinda new to Talend I understood CSV to DataBase.

But I have one scenario that I could not find any where.

I have to do csv to DataBase but I don't have column id in csv but I have it in my table which is primary key and not auto increment.

And I have to dump CSV data in table in such a way that for every record in CSV I have to put id in table as max(id+1)

please help....... I am trying this since last 2 weeks.


Accepted Solutions
Employee

Re: CSV to Database with increment in id column for each record

Hi Roshan, The answer is available in below link and it seems my answer has helped to resolve your issue. https://community.talend.com/t5/Design-and-Development/CSV-to-Database/m-p/150448#M91975 You can try the method specified by Manohar also and it will also give you the same results. Warm Regards, Nikhil Thampi Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

All Replies
Forteen Stars

Re: CSV to Database with increment in id column for each record

@roshan_wani , as part of pre job take the Max id form the target table and load as global variable and use that global variable to do incremental in tmap in the main job while loading from CSV to database using Numeric sequence 

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Employee

Re: CSV to Database with increment in id column for each record

Hi Roshan, The answer is available in below link and it seems my answer has helped to resolve your issue. https://community.talend.com/t5/Design-and-Development/CSV-to-Database/m-p/150448#M91975 You can try the method specified by Manohar also and it will also give you the same results. Warm Regards, Nikhil Thampi Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download