Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Building and Using Variables For tFTPPut Filemask

I'm very new to Talend. I've written a couple very useful scripts at this point. However, I need to get a bit more advanced and was hoping someone could point me in the direction of the documentations / examples to read in order to accomplish it.
I writing a script using tFTPPut to sFTP a file from my local system to a vendor. I have it working with a specified file for the filemask. Unfortunately, the vendor requires this file to have a name with the date embedded. So, the file name will be different every time the file needs to be sent.
I can program. Since it's based on the date, this is a programmatic issue. My first two questions are, then ...

Where do I do my programming to build the date string I need and ...
How do I use that variable in the filemask portion of the tFTPPut action.
Like I said, I'm hoping someone can jump start me by pointing to some appropriate reading material. I'm perfectly capable of figuring it out, I just need to get pointed down the right road, first.
Thanks,
Quintin
Labels (1)
3 Replies
Anonymous
Not applicable
Author

Hi Quintin,
What does your script look like?
For your use case, would you mind setting an example for us?
Best regards
Sabrina
Anonymous
Not applicable
Author

I'm not exactly sure how to present this to you so if there is a better way than what I have done, just say so.
It's a very simple script ...
0683p000009MAtX.png
The tSystem_1 executes a VBS script developed by a supplier to extract data from their SaaS system.
  0683p000009MAtc.png
tFTPPut_1 uses sFTP to send that file to a vendor.
0683p000009MAr3.png  
You will notice in the 'Filemask' that the file name has an embedded data. Somehow, I need to use use yesterday's date to build that YYMMDD string (160629 in the screenshot supplied) and then use that string to build the filename (Delta-834.160629) to be used in the filemask.
Anonymous
Not applicable
Author

I found this tutorial on how to pass a parameter through a context variable.
http://talend-etl-tutorials.blogspot.com/2013/12/talend-begineers-qucik-understanding-of.html
Applying that information would mean instead of coding my file name string within Talend, I could code it outside and pass that string to the (super basic) job that just performed the sFTP operation.
Would that be the best methodology to tackle this with?