How can I unload the contents of a database table as sql script?

One Star

How can I unload the contents of a database table as sql script?

How can I unload the contents of a database table as sql script?
thx

Re: How can I unload the contents of a database table as sql script?

in a tmap you can concatinate all the input columns into a sql statement:
dbInput-->tMap-->fileOutput
in the tMap output table, have a single column with something like this:
Java:
"INSERT INTO TABLE (COLUMN1,COLUMN2) VALUES (" + row1.column1 +","+ row1.column2 + ");"
Perl:
"INSERT INTO TABLE (COLUMN1,COLUMN2) VALUES ( $row1,$row1 );"
Employee

Re: How can I unload the contents of a database table as sql script?

It exist also the SQLULDR2 utility to dump the data of your Oracle and other databases in a flat files, SQL format etc...
You can call the utility from your Talend studio and it works fine.
One Star

Re: How can I unload the contents of a database table as sql script?

Hi,
how do you use SQLULDR2 in talend ? i don't find anything about this
Do you have an example ?
thanks for your help