Delete and insert in a SQL Server imported data from positional file

One Star

Delete and insert in a SQL Server imported data from positional file

Hi all,
I'm a newbie about Talend DI and I would like perform these following tasks:
- import a positional file
- truncate destination table
- transform imported clean
- insert trasformed data into the destination table.
I'm reading the Talend DI User Guide, but actually I dont understand how can i perform this easy job.
Does anyone can notice me any image or simple tutorial useful to my training?
Thanks in advance
One Star

Re: Delete and insert in a SQL Server imported data from positional file

Hi,
I need only a simple example to understand talend machanisms.
Does anybody can help me?
One Star

Re: Delete and insert in a SQL Server imported data from positional file

Try looking at the tutorials and the examples provided with Talend. This is very fundemental stuff.
Moderator

Re: Delete and insert in a SQL Server imported data from positional file

Hi, Rosanero4Ever
For your tasks, we design a job(see pic): tMysqlRow(onSubjectok)-->in.txt(main)-->tMysqloutput-->tLogRow. We set the in.txt as a positional file and the pattern is "7,9,*" , for example:
Id Name age
1 Mike 22
2 John 33
This job can meet your 4 needs:
- import a positional file
- truncate destination table
- transform imported clean
- insert trasformed data into the destination table.
And in the component tMysqlRow, the query is
"truncate table_name"

.

Best Regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Delete and insert in a SQL Server imported data from positional file

Suggest you to check out the following link http://www.talend.com/resources/documentation.php download the appropriate document and start with it.
Best of luck!!!
--
Regards,
Vinod
Four Stars

Re: Delete and insert in a SQL Server imported data from positional file

thank you very much for your kindness.
I'm studying a lot in this moment but I'm fighting with many difficulties (I'm at the second day of using Talend)
The learning curve is hard (for me...) but Talend may be a perfect tool for my work (my job is design dw and etl and at today i wrote only a lot of code for sql scripts)
Thanks again in advance for my future help request Smiley Wink
One Star

Re: Delete and insert in a SQL Server imported data from positional file

Hi, Rosanero4Ever
For your tasks, we design a job(see pic): tMysqlRow(onSubjectok)-->in.txt(main)-->tMysqloutput-->tLogRow. We set the in.txt as a positional file and the pattern is "7,9,*" , for example:
Id Name age
1 Mike 22
2 John 33
This job can meet your 4 needs:
- import a positional file
- truncate destination table
- transform imported clean
- insert trasformed data into the destination table.
And in the component tMysqlRow, the query is
"truncate table_name"

.

Best Regards
Sabrina

Why would you use tMysqlRow to truncate a table when it can be done in tMysqlOutput?
One Star

Re: Delete and insert in a SQL Server imported data from positional file

See http://www.talendforge.org/forum/viewtopic.php?id=17304 for an image of database insert/update/delete.