tFileInputPositional with tFTPFileList

Five Stars

tFileInputPositional with tFTPFileList

Hey guys,

 

I am having trouble using tFileInputPositional with an FTP connection.

 

Firts of all I connect to an FTP server. In the FTP server I have a folder named "files_import". In that folder there are many folders with the names of my company's stores (I will use the name of the folder as a field to insert in my final SQL table with ).

 

Inside the different stores' folders I have a txt file with data that I want to insert in an SQL table.

print talend duvida.png

 

 

When i run the job it does not give any error but it doesn't insert nothing.

 

Can you help me with this? What Am I doing wrong?


If needed I can upload images of each node's configuration.

 

Thanks in advance,
Miguel Cunha

 

 


Accepted Solutions
Sixteen Stars

Re: tFileInputPositional with tFTPFileList

It is very difficult for me to help with solving your path issue (I believe the reason you are not finding the files in the ftp location). Have a play around with trying out different paths. Maybe also use a wildcard to start with on the files to find. First figure out whether you are hitting the right folder and then narrow down your config. I *think* you might be causing a problem with the trailing "/" in your path.

 

Regarding reading in location, take a look at this tutorial (http://umashanthan.blogspot.co.uk/2015/09/save-file-data-to-cache-memory-using.html). I believe that might be what you want to do.


All Replies
Sixteen Stars

Re: tFileInputPositional with tFTPFileList

Looking at your job it doesn't look like the FileList component is finding anything. If it were you would see iterations. So you need to fix your config of the FileList component.

 

Are you meaning to download the file before reading it? You should be. So after you have found your file, use an FTPGet component to download it to a local folder. Then read it.

Five Stars

Re: tFileInputPositional with tFTPFileList

Hi @rhall_2_0

 

But is it possible to read the file directly from the FTP server?

 

The problem is that I would like this job to be executed every 10 minutes. And if I have to have the FtpGet that will increase the loading time more then I wanted.

On the other hand, as i said, in the FTP Server there is a folder for each store. And We have many stores.
Once I want to insert in the final SQL table the name of the folder, I would have to replicate the folder structure of the FTP server, wouldn't I?

 

Anyway, I also think the problem is no the tFTPFileList node.

The Stores' folders containing the files "Cashier.000"  is in the directory "//10.121.156.8/ftp_root/files_import/ficheiros/ Then each Store Folder"

Is there something wrong?

 

print talend duvida 2.png

Sixteen Stars

Re: tFileInputPositional with tFTPFileList

It is very difficult for me to help with solving your path issue (I believe the reason you are not finding the files in the ftp location). Have a play around with trying out different paths. Maybe also use a wildcard to start with on the files to find. First figure out whether you are hitting the right folder and then narrow down your config. I *think* you might be causing a problem with the trailing "/" in your path.

 

Regarding reading in location, take a look at this tutorial (http://umashanthan.blogspot.co.uk/2015/09/save-file-data-to-cache-memory-using.html). I believe that might be what you want to do.

Sixteen Stars

Re: tFileInputPositional with tFTPFileList

Did this work for you?

Five Stars

Re: tFileInputPositional with tFTPFileList

hey @rhall_2_0 , sorry for not answering earlier.

 

It was not what i was wanting to do but yeah, I had to use tFTPGet and store the files locally.

 

So, yeah, I works now.


Thanks for your help.