<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Passing Connection Mode to tFTPGet tFTPPut via context or variable in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Passing-Connection-Mode-to-tFTPGet-tFTPPut-via-context-or/m-p/2286646#M60268</link>
    <description>Hi 
&lt;BR /&gt;It is impossible to set the connection mode with context variables now, it is a list type, we must select one of them at the job design time! However, there is a work around to fit the request, that is to create two different sub jobs and fires them base on a context variable, for example: 
&lt;BR /&gt;tJava--runIf--tRunJob_1 
&lt;BR /&gt; --runIf--tRunJob_2 
&lt;BR /&gt;on tJava: 
&lt;BR /&gt;if(context.connectionMode.equals("active")){ 
&lt;BR /&gt;globalMap.get("active",true); 
&lt;BR /&gt;}else{ 
&lt;BR /&gt;globalMap.get("active",false); 
&lt;BR /&gt;} 
&lt;BR /&gt;on the first runIf, set the condition as: 
&lt;BR /&gt;(Boolean)globalMap.get("active") 
&lt;BR /&gt;on the second runIf, set the condition as: 
&lt;BR /&gt;!(Boolean)globalMap.get("active") 
&lt;BR /&gt;in the first child job, use a tFTPConnection to create a ftp connection with 'Active mode' 
&lt;BR /&gt;in the seond child job, use a tFTPConnection to create a ftp connection with 'Passive mode' 
&lt;BR /&gt; 
&lt;BR /&gt;So now, you are able to change the value of context variable and execute the job script with specified value. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
    <pubDate>Mon, 20 Jun 2011 06:35:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-06-20T06:35:24Z</dc:date>
    <item>
      <title>Passing Connection Mode to tFTPGet tFTPPut via context or variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Passing-Connection-Mode-to-tFTPGet-tFTPPut-via-context-or/m-p/2286645#M60267</link>
      <description>I'm need to be able to set the FTP Connection mode in a context so that after a job is exported, I can change the connection mode (PASV or ACTV) without editing the job and re-exporting.
&lt;BR /&gt;Is this possible?
&lt;BR /&gt;I'm using TIS 4.0.3</description>
      <pubDate>Sat, 16 Nov 2024 12:51:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Passing-Connection-Mode-to-tFTPGet-tFTPPut-via-context-or/m-p/2286645#M60267</guid>
      <dc:creator>JimmyM</dc:creator>
      <dc:date>2024-11-16T12:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Connection Mode to tFTPGet tFTPPut via context or variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Passing-Connection-Mode-to-tFTPGet-tFTPPut-via-context-or/m-p/2286646#M60268</link>
      <description>Hi 
&lt;BR /&gt;It is impossible to set the connection mode with context variables now, it is a list type, we must select one of them at the job design time! However, there is a work around to fit the request, that is to create two different sub jobs and fires them base on a context variable, for example: 
&lt;BR /&gt;tJava--runIf--tRunJob_1 
&lt;BR /&gt; --runIf--tRunJob_2 
&lt;BR /&gt;on tJava: 
&lt;BR /&gt;if(context.connectionMode.equals("active")){ 
&lt;BR /&gt;globalMap.get("active",true); 
&lt;BR /&gt;}else{ 
&lt;BR /&gt;globalMap.get("active",false); 
&lt;BR /&gt;} 
&lt;BR /&gt;on the first runIf, set the condition as: 
&lt;BR /&gt;(Boolean)globalMap.get("active") 
&lt;BR /&gt;on the second runIf, set the condition as: 
&lt;BR /&gt;!(Boolean)globalMap.get("active") 
&lt;BR /&gt;in the first child job, use a tFTPConnection to create a ftp connection with 'Active mode' 
&lt;BR /&gt;in the seond child job, use a tFTPConnection to create a ftp connection with 'Passive mode' 
&lt;BR /&gt; 
&lt;BR /&gt;So now, you are able to change the value of context variable and execute the job script with specified value. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Mon, 20 Jun 2011 06:35:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Passing-Connection-Mode-to-tFTPGet-tFTPPut-via-context-or/m-p/2286646#M60268</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-20T06:35:24Z</dc:date>
    </item>
  </channel>
</rss>

