<?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: Talend (Ubuntu) - Read System Variables in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Talend-Ubuntu-Read-System-Variables/m-p/2301804#M73871</link>
    <description>&lt;P&gt;We have a Talend Component named tSSH where you could invoke your commands, for your scenario -&amp;nbsp;&lt;SPAN&gt;"echo $WORK_ENV".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now you have to define the Standard Output for tSSH to "global variable" so that you could catch the output and make use of it in your next steps/components.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Aug 2018 14:23:08 GMT</pubDate>
    <dc:creator>iamabhishek</dc:creator>
    <dc:date>2018-08-13T14:23:08Z</dc:date>
    <item>
      <title>Talend (Ubuntu) - Read System Variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-Ubuntu-Read-System-Variables/m-p/2301801#M73868</link>
      <description>&lt;P&gt;I wanted to create a flow which would pick a configuration file based on the system variable "WORK_ENV". While I could do "echo $WROK_ENV" and can get the desired output on the console, I can't seem to do that in the Java node of my talend job.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have tried using System.getenv("WORK_ENV") as well as the newer System.getProperty("WORK_ENV"). Both of them yield null.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Web search suggests me that the same constructs are working for people but for some odd reason, it isn't working for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Talend Version is Open Studio 7.0.1, on Ubuntu 16.04LTS&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 18:16:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-Ubuntu-Read-System-Variables/m-p/2301801#M73868</guid>
      <dc:creator>sushantV</dc:creator>
      <dc:date>2018-08-10T18:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Talend (Ubuntu) - Read System Variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-Ubuntu-Read-System-Variables/m-p/2301802#M73869</link>
      <description>Did you try to get the output of "echo $WROK_ENV" to global variable instead of console?</description>
      <pubDate>Mon, 13 Aug 2018 09:15:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-Ubuntu-Read-System-Variables/m-p/2301802#M73869</guid>
      <dc:creator>iamabhishek</dc:creator>
      <dc:date>2018-08-13T09:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Talend (Ubuntu) - Read System Variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-Ubuntu-Read-System-Variables/m-p/2301803#M73870</link>
      <description>&lt;P&gt;Not sure if I followed your recommendedation, Abhishek. Is there a way that I can echo/ print in the talend? Just to ensure that there is no confusion, if I do "echo $WORK_ENV" on the ubuntu terminal, I can see the following output.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot from 2018-08-13 13-11-04.png" style="width: 391px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LzdV.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144244i63F9EE6CDA55B5EE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LzdV.png" alt="0683p000009LzdV.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 14:13:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-Ubuntu-Read-System-Variables/m-p/2301803#M73870</guid>
      <dc:creator>sushantV</dc:creator>
      <dc:date>2018-08-13T14:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Talend (Ubuntu) - Read System Variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-Ubuntu-Read-System-Variables/m-p/2301804#M73871</link>
      <description>&lt;P&gt;We have a Talend Component named tSSH where you could invoke your commands, for your scenario -&amp;nbsp;&lt;SPAN&gt;"echo $WORK_ENV".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now you have to define the Standard Output for tSSH to "global variable" so that you could catch the output and make use of it in your next steps/components.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 14:23:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-Ubuntu-Read-System-Variables/m-p/2301804#M73871</guid>
      <dc:creator>iamabhishek</dc:creator>
      <dc:date>2018-08-13T14:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Talend (Ubuntu) - Read System Variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-Ubuntu-Read-System-Variables/m-p/2301805#M73872</link>
      <description>&lt;P&gt;Good to know info. Thanks.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I tried utilizing the tSSH component and was able to print the value of the system variable. How do I utilize that in my flow is what still troubles me.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#993300"&gt;Starting job test_process_only_latest_file_opt2 at 13:36 13/08/2018.&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#993300"&gt;[statistics] connecting to socket on port 3542&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#993300"&gt;[statistics] connected&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#993300"&gt;Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.15.0-30-generic x86_64)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#993300"&gt;* Documentation: &lt;A href="https://help.ubuntu.com" target="_blank" rel="nofollow noopener noreferrer"&gt;https://help.ubuntu.com&lt;/A&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#993300"&gt;* Management: &lt;A href="https://landscape.canonical.com" target="_blank" rel="nofollow noopener noreferrer"&gt;https://landscape.canonical.com&lt;/A&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#993300"&gt;* Support: &lt;A href="https://ubuntu.com/advantage" target="_blank" rel="nofollow noopener noreferrer"&gt;https://ubuntu.com/advantage&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#993300"&gt;0 packages can be updated.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#993300"&gt;0 updates are security updates.&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#993300"&gt;Last login: Mon Aug 13 13:35:24 2018 from 127.0.0.1&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#993300"&gt;echo $WORK_ENV&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#993300"&gt;exit&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#993300"&gt;pas@ubuntu:~$ echo $WORK_ENV&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#993300"&gt;dev&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#993300"&gt;pas@ubuntu:~$ exit&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#993300"&gt;logout&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#993300"&gt;[statistics] disconnected&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 14:38:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-Ubuntu-Read-System-Variables/m-p/2301805#M73872</guid>
      <dc:creator>sushantV</dc:creator>
      <dc:date>2018-08-13T14:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Talend (Ubuntu) - Read System Variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-Ubuntu-Read-System-Variables/m-p/2301806#M73873</link>
      <description>&lt;P&gt;This seems very odd. Can you build a job with 1 tJava component only and add this code to it....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;System.out.println(System.getenv("&lt;SPAN&gt;WORK_ENV&lt;/SPAN&gt;"));&lt;/PRE&gt;&lt;P&gt;When you run it, can you see your variable value?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 14:43:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-Ubuntu-Read-System-Variables/m-p/2301806#M73873</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-13T14:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Talend (Ubuntu) - Read System Variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-Ubuntu-Read-System-Variables/m-p/2301807#M73874</link>
      <description>&lt;P&gt;Once the tSSH component successfully executes the commands and provided that you have selected the standard output as global variable you could access the value in your next components like this -&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;((String)globalMap.get("tSSH_1_STDOUT"))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 14:48:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-Ubuntu-Read-System-Variables/m-p/2301807#M73874</guid>
      <dc:creator>iamabhishek</dc:creator>
      <dc:date>2018-08-13T14:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Talend (Ubuntu) - Read System Variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-Ubuntu-Read-System-Variables/m-p/2301808#M73875</link>
      <description>&lt;P&gt;It was weird but the same code worked fine. I might have missed a little detail somewhere, which I am still unable to figure out. Thanks Abhishek and Rhall. I certainly learnt few more things in the process.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 18:54:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-Ubuntu-Read-System-Variables/m-p/2301808#M73875</guid>
      <dc:creator>sushantV</dc:creator>
      <dc:date>2018-08-13T18:54:38Z</dc:date>
    </item>
  </channel>
</rss>

