Upload file to FTP - exception with new name

Highlighted
Five Stars

Upload file to FTP - exception with new name

Hello,

 

I'm trying to upload files that end with "xls" to a FTP, it works fine if I keep the default name but If i try to chose a new name an exception occurs.

 

My job :

 

tt.pngput.png

For example, if instead of "tr.xls" I type "" the job works fine but I don't want to keep the default name.

 

Here is the error I get :

Exception in component tFTPPut_1 (JS_M03_RECETTES)
4: /data/intametis/./*.xls is not unique: [/data/intametis/./test.xls, /data/intametis/./ventes_2018_20180613.xls, /data/intametis/./ventes_2012_20180613.xls, /data/intametis/./ventes_201806_20180730_.xls]

 

All the files mentioned(ventes_2018_20180613.xls, ventes_2012_20180613.xls, ventes_201806_20180730_.xls) are files already on the FTP, test.xls is the file I want to upload. In the end, the job works because I can find the file on the FTP but I don't understand why there is an exception.

 

I use Talend Open Studio for Data Integration 6.5.1.

 

Thanks in advance.


Accepted Solutions
Forteen Stars

Re: Upload file to FTP - exception with new name

@AlexFa,yes when your remote directory have few files with same kind of extension and trying put a new file with new file masking it was failing.

if you have not specified file mask for New name then it was working. once you put in FTP,use tFTPRename component to rename the file.

 

 

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

All Replies
Forteen Stars

Re: Upload file to FTP - exception with new name

@AlexFa,since you have multiple files in local directory,so you are going to file mask for all files like tr.xls .which will not allow you. so you need to have only one file or you your file mask should be dynamic for each file.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Five Stars

Re: Upload file to FTP - exception with new name

I only have one file in my local directory :

 

localdir.png

Forteen Stars

Re: Upload file to FTP - exception with new name

@AlexFa,i have tested and working as expect that,you should have a  single file in with .xls format local directory and you should specify Overwrite file option as  Overwrite.

 

i belive your issue will be fixed after changing Overwrite file in Basic settings of tFTPPut.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Five Stars

Re: Upload file to FTP - exception with new name

Thanks for the reply but the tFTPPut is already set on overwrite ("Ecraser" is french for overwrite).

For me the problem come from the FTP but I have no clue why, in the exception message "/data/intametis/" refers to the FTP directory.
Forteen Stars

Re: Upload file to FTP - exception with new name

@AlexFa,where do you ventes_2018_20180613.xls file in local directory or remote directory ?

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Five Stars

Re: Upload file to FTP - exception with new name

The file is in the remote directory, the only file in the local directory is "test.xls"
Forteen Stars

Re: Upload file to FTP - exception with new name

@AlexFa,yes when your remote directory have few files with same kind of extension and trying put a new file with new file masking it was failing.

if you have not specified file mask for New name then it was working. once you put in FTP,use tFTPRename component to rename the file.

 

 

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

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 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now