CSV to Database with increment in id column for each record

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
Highlighted
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 :-)

Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for spending their time for your query. If your query is answered, please mark the topic as resolved :-)

All Replies
Thirteen 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
Highlighted
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 :-)

Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for spending their time for your query. If your query is answered, please mark the topic as resolved :-)

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

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