Place to Save Temp Files

One Star

Place to Save Temp Files

Hey guys, I'm working a project, which downloads a file from a FTP server using tFTPGet, rearranges the columns, then uploads the new file to another FTP server. I want to export the job as a .jar and make it portable to any machine. However, I'm running into a problem because I don't know where to store the files that get pulled from the FTP server. Is there a way to direct tFTPGet to save the files in some sort of local working directory? If not are there any other viable solutions to this problem? 
One Star

Re: Place to Save Temp Files

You can the files anywhere you want then delete them before your job finish.
Regards,
Fred
One Star

Re: Place to Save Temp Files

I'm able to save the files and then delete them when I'm done. However, my problem is where do I save them if I want to make my job fully portable on each machine? Not every machine I'll be running it on will have a /usr/UserName/Desktop/ProjectTempFile folder. I'm wanting to know how to save it in the directory that the .jar file resides when I build the project. 
Moderator

Re: Place to Save Temp Files

Hi,
Can you use a context variable to define your temp data directory path? Such as, context.REX_DIR_TempFileCache.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
One Star

Re: Place to Save Temp Files

I can define a context variable to store the location path where I want to save the file. However, what I'm wanting to know is if there is a way to store the file in the same location that the built Job is running from. Once that job moves around, the directory path is not the same and I want to see if there is a dynamic way for the job to know where it is running from. 
Seventeen Stars

Re: Place to Save Temp Files

hi all,
I guess you misunderstood the use of context varaibles.
Have a look at how you can specify a context variable with different value due to the environement you're running it.
https://help.talend.com/search/all?query=How+to+centralize+contexts+variables&content-lang=en
regards
laurent

What’s New for Talend Spring ’19

Join us live for a sneak peek!

Sign up now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads