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: 
MarkGordonMcN
Contributor II
Contributor II

tFTPPut with filemask from row

Hi,
I am trying to use tFTPPut with a file mask generated and new filename provided by a main flow. I have tried using row2.FILENAME for the filemask, and verified that it was set correctly. I have also tried using tSetGlobalVar to put it in a global and using that (I used the autocomplete to grab the reference to the global variable to prevent typos by me), but either way it doesn't work. Stepping through in the JAva debugger I got to this piece of code...
 /**
  * [tFTPPut_2 main ] start
  */
 currentComponent = "tFTPPut_2";
 try {
  globalMap.put(
    "tFTPPut_2_CURRENT_STATUS",
    "No file transfered.");
  java.util.Set<String> keySettFTPPut_2 = maptFTPPut_2
    .keySet();
  for (String keytFTPPut_2 : keySettFTPPut_2) {
   if (keytFTPPut_2 == null
     || "".equals(keytFTPPut_2)) {
    System.err
      .println("file name invalid!");
    continue;
   }

and found that keytFTPPut_2 was always being set to null even when I could see that the row and global were both set to the correct strings.

Further up in the generated code I have found this...
 // becasue there is not the same method in JSch class as
 // FTPClient class, define a list here
 java.util.List<String> msg_tFTPPut_2 = new java.util.ArrayList<String>();
 com.jcraft.jsch.SftpProgressMonitor monitortFTPPut_2 = new MyProgressMonitor_tFTPPut_2();
 java.util.List<java.util.Map<String, String>> listtFTPPut_2 = new java.util.ArrayList<java.util.Map<String, String>>();
 java.util.Map<String, String> maptFTPPut_20 = new java.util.HashMap<String, String>();
 maptFTPPut_20.put(((String) globalMap.get("FILENAME")),
   ((String) globalMap.get("newFile")));
 listtFTPPut_2.add(maptFTPPut_20);

So to someone like me not that familiar with Talend it looks like it is storing the values in the wrong place!
Labels (3)
1 Reply
Anonymous
Not applicable

Hi MarkGordonMcNicholas,

Would you mind posting your job design screenshots into forum? In this way, we can see if there is something wrong with your global variable usage.
Best regards
Sabrina