[resolved] tFileList-----iterate------tFileproperties

Hi I am trying to Read a directory listing and get the properties of each file i.e. base name, md5 etc and load them to context variables. however when I am struggling to join tFilelist to tFileProperties. i get the following error (see screen shot) . The screen shot only show the output going to tLogRow for now....
1 ACCEPTED SOLUTION

Accepted Solutions
Four Stars

Re: [resolved] tFileList-----iterate------tFileproperties

Hi Silvio,
Not sure what is the problem you are facing, but this is something important requirement and don't see that it could be a bug...
the job is like
tFileList-->itearte-->tFileProperties-->tLogrow
- Use appropriate filter for file names or use "*" and give path of the folder
this job would provide details of all the files which matches with the filter...
Vaibhav
11 REPLIES
One Star

Re: [resolved] tFileList-----iterate------tFileproperties

Hi
Welcome to Talend Community!
The screen shot is missing.
Regards,
Pedro

Re: [resolved] tFileList-----iterate------tFileproperties

Hi Yes I am trying to upload it , but it does not , I keep browsing and attaching ... will troubleshoot
Hi
Welcome to Talend Community!
The screen shot is missing.
Regards,
Pedro
One Star

Re: [resolved] tFileList-----iterate------tFileproperties

Hi
Please notice the limits: 20 images per post, each image must be less then 1024x768 pixels and 200 KB.
Regards,
Pedro

Re: [resolved] tFileList-----iterate------tFileproperties

attached screen shot>
more info:
error:
Syntax error on token "tFileList_1_CURRENT_FILE", , expected
Settings
tFileList:
Directory: "/etc/samba/CT/Load/"
tFileProperties:
File: "/etc/samba/CT/Load/((String)globalMap.get("tFileList_1_CURRENT_FILE"))"
when setting my file in tFileProperties to a staid file its output is good.
One Star

Re: [resolved] tFileList-----iterate------tFileproperties

Hi
You'd better modify the 'File' text field with this expression ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")).
Regards,
Pedro

Re: [resolved] tFileList-----iterate------tFileproperties

Hi Pedro
thanks ... but i get the following

Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Syntax error on token "tFileList_1_CURRENT_FILEPATH", , expected
One Star

Re: [resolved] tFileList-----iterate------tFileproperties

Seems to be working fine on my PC....
If you could upload snapshots of the properties of all components,will have a look into it.
One Star

Re: [resolved] tFileList-----iterate------tFileproperties

I have a similar problem but I actually need to add the Basename of the tFileProperties to the schema of the input file during the flow/stream. What I want to achieve is tFileList ---Iterate--->tFileProperties-------Main------>tMap------Main---->SQLTable. In the SQLTable I want to have the schema + the tFileProperties(Basename). I tried adding to a Var but I don't think these dynamically update for each Iteration or for that matter each row, but rather update only by the Job.
I have tried a tJavaRow using a (string)global.map(tfileList_1_Current_File) but that threw up some assignment to VAR error - can't remember exactly as I have tried so many I thought better stop and seek some help...!!!
Other thoughts were to read the file list first to an SQL table and then do some sort of Loop on the table to provide the filter on the tFileList but I guess would need to do an If...Else to count down the index of the file list in the SQL table but then not sure how the Else would finish the job.
Looking for an elegant solution....!!!!
Any help would be much appreciated.
One Star

Re: [resolved] tFileList-----iterate------tFileproperties

After feeling I may have been asking a very simple question, though my Informatica colleagues at work did not have a clear solution, I read the UG agai and noticed the parallel Iteration function and used this as below. May not be the most elegant but it seems to work. I use the SetGlobalVar as the Filename for each pass of the tFileList and then have have to LTRIM the file. I'll need to do a DateParse on the output string to reformat but I can live with that.
Be very happy if anone has a solution that can pick up the tFileProperties Basename or mtime and get the date that would be much preferred.
One Star

Re: [resolved] tFileList-----iterate------tFileproperties

Hi,
I'm a developer at BalanceConsulting, an italian IT company. I used to use Talend to migrate data or to create some small data quality project.
In these days I am creating a job to read the contents of a folder and know the files inside it. I used tflilelist component but I have no way of generating a iterated connection. I do not find in the list of possible connections. I already did a similar job on version 5.5 of Talend installed on a machine with windows7, now with version 5.6 and on a machine with windows8 I can not. There are bugs on this topic? Other users have my problem?
Best Regards, and thanks in advance for your help.
Silvio Ivaldi
PS I'm trying to attach file but I'm not able to do this, Have i create a payment account? At the moment i used to use the free one. I wish you apologize me for something bad in this post.
Four Stars

Re: [resolved] tFileList-----iterate------tFileproperties

Hi Silvio,
Not sure what is the problem you are facing, but this is something important requirement and don't see that it could be a bug...
the job is like
tFileList-->itearte-->tFileProperties-->tLogrow
- Use appropriate filter for file names or use "*" and give path of the folder
this job would provide details of all the files which matches with the filter...
Vaibhav