file ftp'd from remote to local throws error when reading the file

Six Stars

file ftp'd from remote to local throws error when reading the file

Hi Team,

I had ftp 'd a file from remote server to my local server with filemask option specified as

context.filename+context.rundt+context.extension and the file got ftp'd successfully.

But when i tried to read the same file through tfileinput component i get the error as 

"(No such file or directory)"

Below is the error message -

[FATAL] (main): goc_etl.jo_test_sftp_0_1.jo_test_sftp - tFileInputPositional_1 /local_directory_path/filename_yyyymmdd*.txt (No such file or directory).

In the tfileinput component Filename/stream i had given as 

local_directory_path+context.filename+context.run_dt+context.extn.

 

I am new to talend and not understanding where have i gone wrong. Please guide me on this.

 

 

 

Sixteen Stars TRF
Sixteen Stars

Re: file ftp'd from remote to local throws error when reading the file

"/local_directory_path/filename_yyyymmdd*.txt" 

you need to remove the * in the filename for tFileInputPositional_1.


TRF
Sixteen Stars TRF
Sixteen Stars

Re: file ftp'd from remote to local throws error when reading the file

Did this help?
If so thanks to mark your case as solved.

TRF
Six Stars

Re: file ftp'd from remote to local throws error when reading the file

Hi,

 

Thanks for your reply.

 

"/local_directory_path/filename_yyyymmdd*.txt"

you need to remove the * in the filename for tFileInputPositional_1.

Ans:In the tfileinput component Filename/stream i had given as

local_directory_path+context.filename+context.run_dt+context.extn.

 

Below is the error message which i get on running the job -

[FATAL] (main): goc_etl.jo_test_sftp_0_1.jo_test_sftp - tFileInputPositional_1 /local_directory_path/filename_yyyymmdd*.txt (No such file or directory).

Six Stars

Re: file ftp'd from remote to local throws error when reading the file

No ..because i havent given * in the tfileinputpositional component. what i had given was
local_directory_path+context.filename+context.run_dt+context.extn.
Sixteen Stars TRF
Sixteen Stars

Re: file ftp'd from remote to local throws error when reading the file

* is a special character (joker).
Cannot be part of a real filename.

TRF

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 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog