• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » tAdvancedFileOutputXML filename

#1 2010-03-02 22:34:26

chow
Guest

tAdvancedFileOutputXML filename

Tags: [filename, xml]

Hi

I want assistance in overcoming the issue i am facing while using tAdvancedFileOutputXML component.
My scenario is as below

tFileList1 ====> tFileInputPositional1 ====> tAdvancedFileOutputXML1

The issue is the file name of the tAdvancedFileOutputXML.
I am getting the StringIndexOutOfBoundsException when i use ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))+".xml"
as file name in the tAdvancedFileOutputXML component.

However if i hard code the name of the xml something like output.xml everything is working fine.
Am i missing something here. Is this same as bug 6661 whose status is fixed as per the below url

http://talendforge.org/bugs/view.php?id=6661

I am using 3.2.1.r31371

Thanks in Advance
Chow

#2 2010-03-04 16:32:52

chow
Guest

Re: tAdvancedFileOutputXML filename

Can someone help me with this. I am kind of stuck here with the above issue.

Thanks
Chow

#3 2010-03-05 09:00:46

shong
Talend team
Registered: 2007-08-29
Posts: 10297
Website

Re: tAdvancedFileOutputXML filename

Hello
((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) contains the file path and file name, eg:
E:\t\TOS323\TOS-All-r35442-V3.2.3\workspace\in.csv
If you set the file name as:
((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))+".xml" 
the result will be:
E:\t\TOS323\TOS-All-r35442-V3.2.3\workspace\in.csv.xml
I think you only want to get the file name without extention, so just set the file name as:
"D:/outputFolder/"+((String)globalMap.get("tFileList_1_CURRENT_FILE")).substring(0,((String)globalMap.get("tFileList_1_CURRENT_FILE")).indexOf("."))+".xml"

Best regards
 
         shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » tAdvancedFileOutputXML filename

Board footer

Powered by FluxBB