Coder
Coder

Reputation: 7076

Read file from dynamic file location using talend

I am using Talend Studio for Data Integration v5.3.1.

In that I created a Job for fileDelimited. I have uploaded a CSV file and it is reading the file.

I exported the Job as a Zip file, extracted it, and I run the sh file in Terminal. And it was reading the file and displaying it in the console.

Now I want to read a different file in some other file location. is it possible to read the different file by running the same shell script? If so, where I have to change?

Upvotes: 1

Views: 6497

Answers (2)

UmeshR
UmeshR

Reputation: 833

you can do it using context variables, and context load. create configuration file which will have all the required input location path and other details.

you have different files on different location and you just wanted upload files without file parsing right? if so then

first create configuration file with two parameters.

FilePath|FileName
\\Folderone\|File1.txt
\\Foldertwo\|File2.txt

create two context variables in context named as FilePath & FileName and then used tContextLoad to load above configuration details to context variable

used these variables to provide file and path at runtime from configuration.

Upvotes: 1

Jean-Michel Garcia
Jean-Michel Garcia

Reputation: 2389

See my answer here : https://stackoverflow.com/a/17565718/921244 to have guidance on how to open the Demo project.

There you will find a demo job for loading Context variables.

If you want an online example, take a look at the official documentation : http://www.talendforge.org/tutorials/tutorial.php?language=english&idTuto=34

Upvotes: 0

Related Questions