Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Talend Community,
We use the most recent version of Talend Open Studio and have about 15 .csv files that we need to import into our DB2 DB.
Is it possible to build a single job that imports those .csv files (via pre-defined list or just all
files at location x) and creates a DB2 table or drops and recreates and existing one?
Hi,
Thanks for the feedback.
I see.
I think I made some progress using tFileList, tFileInputDelimited, tLogRow and tDBOutput
using ((String)globalMap.get("tFileList_1_CURRENT_FILE")) in tDBOutput for the "Table Name".
However, my ((String)globalMap.get("tFileList_1_CURRENT_FILE")) has usually odd naming and
file formats, I need to map all my 15 ((String)globalMap.get("tFileList_1_CURRENT_FILE")) to
DB-naming that I chose. I wonder if tMap could map and create a formated
_CURRENT_FILE_MAPPED_ or so.
The .csv files are small, non has more than 2000 rows.
Rather than doing 15 jobs I want to have one job that does it dynamic.
Hi,
thanks for the replies.
@abhishekKUMAR
((String)globalMap.get("tFileList_1_CURRENT_FILE")) is already the dynamic schema/table name
that is used for every file (iterated). So I can use that inside
the tDBOutput "Table Name" Textbox.
The table is then created if not already existing (that is also a setting).
However, ((String)globalMap.get("tFileList_1_CURRENT_FILE")) will, in my case, contain
.csv at the end or others and I need to Map it to a proper, DB table object name.