Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to insert table and table data from CSV File to Database,please provide solution step by step
You're going to need 3 major components:
1.tFileInputDelimited
2.tMap
3.a Database output component
Should look something like this when done.
Go thru huge number of examples
check site - https://www.talendbyexample.com
You're going to need 3 major components:
1.tFileInputDelimited
2.tMap
3.a Database output component
Should look something like this when done.
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.
Hi Roshan,
Could you please try below method.
Step 1:- Take the maximum value of the DB and store it in a context variable
Step 2:- Use a numeric sequence and instead of starting from 1, use the context variable+1 as the starting value.
Then the number will increment from that specific value. Please refer the screen shot for details.
Numeric.sequence("s1",(context.max_number+1),1)
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 🙂
Usually Tschemacomplance check is better to use from CSV to database, because while testing goes, Testers will always put more than the maximum value and test, than entire job fails, Please look at below example for this. It is better to design in this way