Load multiple XML Files into a mySQL DataBase

One Star

Load multiple XML Files into a mySQL DataBase

Hi,
I have a foder where I have 3 xml Files CDR01--CDR03 which have the same format. I want to select these three files, process them (extract only some information from) and then put the extracted data into a DataBase.
I used the
Tfilefilter : where I gave the link of the folder where I have my xml files,
tFilelinputXml: and here is where I have the problem : it when I need to give the "file name/Stream" and here I have just one option is to give the link for one xml file.
So when I run the Job I have in my Database the selected file 3 times.
So my question is how to tell to the tFileInputXML to have as input a different files.
Thank you I hope I am clear.

One Star

Re: Load multiple XML Files into a mySQL DataBase

Hi
Type this expression in the "file name/Steam" text field on tFileList.
((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))
Regards,
Pedro
Tags (1)
Highlighted
One Star

Re: Load multiple XML Files into a mySQL DataBase

Thanks a Lot It worked Smiley Happy
Four Stars

Re: Load multiple XML Files into a mySQL DataBase

Hello !

I have exactly the same problem as mister. Problem : i can't put : ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))

in the Steam field in tFileImputXml, it says that the file path isn't good.

I assume that i have to change "tFileList_1_CURRENT_FILEPATH" with the path to my folder, but it also says the path isn't good. 

Maybe i have to change (String) but i dont know what i have to put instead.

Or do i have to let the sentence exactly like this ?

Can someone help me please ?

Four Stars

Re: Load multiple XML Files into a mySQL DataBase

Okay my bad.

Solution : 

Say Change to Built-in for ProprietyType.

Then you can write freely in the Stream.

If someone encounters the problem again.

Have a nice day.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog