N/A

Error when use tFileList--tFileInputDelimited-tLogRow

hi to all!
i'm trying to read all the txt file from a directory using a tFileList---tFileInputDelimited--tLogRow
in the tFileList i put my directory, in the tFileInputDelimited i put "((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))"
if i execute i have this error:
The constructor FileInputDelimited(String, String, String, String, String, boolean, int, int, int, int) is undefined
Syntax error on token "tFileList_1_CURRENT_FILEPATH", , expected
and when i go to see to the code my error is here
new org.talend.fileprocess.FileInputDelimited("((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))","ISO-8859-15",",","\n",true,0,0,-1,-1);
can someone help?
thank you
3 REPLIES
One Star

Re: Error when use tFileList--tFileInputDelimited-tLogRow

Not sure if I understand you right. In the textbox you should have: ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))
The " at the begin end should not be in the File Name text box because it would mean to use the string instead of the value returned by the expression
N/A

Re: Error when use tFileList--tFileInputDelimited-tLogRow

oops
you right...now it goes
thank you very much


Not sure if I understand you right. In the textbox you should have: ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))
The " at the begin end should not be in the File Name text box because it would mean to use the string instead of the value returned by the expression
N/A

Re: Error when use tFileList--tFileInputDelimited-tLogRow

hi to all, its still me..
if in a directory i have to kind of files, positional and delimited:
1. can i recognize with a tJava who is the kind of file that i'm reading and then to put the file(positional or delimited) in the corrispodent tFileInputXXX
tFileList(positional,delimited) ----->Iterate-------->tJava------->RunIf------->tFileInputPositional------>tLogRow
|
|
RunIf------>tFileInputDelimited----->tLogRow

2.I have in the directory of input more files(i supposed that i don't how many files) that i'm gonna elaborate, but then in output i want the same number of files with the same name, how can i do this
3.I made a schema like this:
tFileList(positional,delimited) ----->Iterate------->tFileInputPositional------>tLogRow
when i leave just one positional file in the directory i have an error
Exception in component tFileList_1
java.lang.RuntimeException: No file found in directory C:/Talend
if i try to read a delimited file from the tFileList, i don't have errors, the Job goes OK
thanks to all,
regards