<?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: Reading context param in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Reading-context-param/m-p/2228872#M19998</link>
    <description>S3Get is not using existing connection. I have connection details given&lt;BR /&gt;with in S3Get. I don't really need tS3Connection.&lt;BR /&gt;</description>
    <pubDate>Mon, 27 Apr 2020 21:24:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-04-27T21:24:45Z</dc:date>
    <item>
      <title>Reading context param</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Reading-context-param/m-p/2228868#M19994</link>
      <description>&lt;P&gt;Greetings:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am trying to read file name as an input from context param and pass it to s3Get to read it from a bucket. I tried using s3List and s3Get to read files and it works fine. But my requirement is to read a file that is given through command line argument. I am getting NullPointer exception when the code is trying to look for the context param in the context. I ran the debugger and found the following code acting weird. I appreciate any help.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;if (inContext == null) {&lt;BR /&gt;inContext = S3ReadFile.class.getClassLoader()&lt;BR /&gt;.getResourceAsStream("config/contexts/" + contextStr + ".properties");&lt;BR /&gt;}&lt;BR /&gt;if (inContext != null) {&lt;BR /&gt;// defaultProps is in order to keep the original context value&lt;BR /&gt;if (context != null &amp;amp;&amp;amp; context.isEmpty()) {&lt;BR /&gt;defaultProps.load(inContext);&lt;BR /&gt;context = new ContextProperties(defaultProps);&lt;BR /&gt;}&lt;/P&gt; 
&lt;P&gt;inContext.close();&lt;BR /&gt;} else if (!isDefaultContext) {&lt;BR /&gt;// print info and job continue to run, for case: context_param is not empty.&lt;BR /&gt;System.err.println("Could not find the context " + contextStr);&lt;BR /&gt;}&lt;/P&gt; 
&lt;P&gt;I am using Studio for Data Integration v7.3. Here are my project details.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Flow_1.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA5P.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/131736iB79E07DAD4F46672/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA5P.png" alt="0683p000009MA5P.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Flow_2.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9e.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138400iBCEEFE745A579AEE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9e.png" alt="0683p000009MA9e.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Flow_3.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9uQ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143147i13F1819625A9F6A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9uQ.png" alt="0683p000009M9uQ.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 19:12:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Reading-context-param/m-p/2228868#M19994</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-27T19:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Reading context param</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Reading-context-param/m-p/2228869#M19995</link>
      <description>How are you passing parameters from the command line? Did you try "–context_param yourParameter=whatYouWant"?</description>
      <pubDate>Mon, 27 Apr 2020 20:15:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Reading-context-param/m-p/2228869#M19995</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2020-04-27T20:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reading context param</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Reading-context-param/m-p/2228870#M19996</link>
      <description>&lt;P&gt;Yes, that is what I tried. I also tried setting up prompt value to test run from the studio. Same error both times.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 20:31:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Reading-context-param/m-p/2228870#M19996</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-27T20:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Reading context param</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Reading-context-param/m-p/2228871#M19997</link>
      <description>You have to connect tS3Get to tS3Connection to ensure tS3Get starts after the connection has been established:&lt;BR /&gt;tS3Connection--(OnComponentOk)--&amp;gt;tS3Get</description>
      <pubDate>Mon, 27 Apr 2020 21:21:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Reading-context-param/m-p/2228871#M19997</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2020-04-27T21:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Reading context param</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Reading-context-param/m-p/2228872#M19998</link>
      <description>S3Get is not using existing connection. I have connection details given&lt;BR /&gt;with in S3Get. I don't really need tS3Connection.&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Apr 2020 21:24:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Reading-context-param/m-p/2228872#M19998</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-27T21:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: Reading context param</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Reading-context-param/m-p/2228873#M19999</link>
      <description>So what if you really remove tS3Connection?</description>
      <pubDate>Mon, 27 Apr 2020 21:38:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Reading-context-param/m-p/2228873#M19999</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2020-04-27T21:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reading context param</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Reading-context-param/m-p/2228874#M20000</link>
      <description>I just tried that too. Same issue.&lt;BR /&gt;&lt;BR /&gt;Exception in component tS3Get_1 (S3ReadFile)&lt;BR /&gt;java.lang.NullPointerException&lt;BR /&gt;at westat.s3readfile_0_1.S3ReadFile.tS3Get_1Process(S3ReadFile.java:587)&lt;BR /&gt;at westat.s3readfile_0_1.S3ReadFile.runJobInTOS(S3ReadFile.java:7331)&lt;BR /&gt;at westat.s3readfile_0_1.S3ReadFile.main(S3ReadFile.java:7175)&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Apr 2020 21:46:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Reading-context-param/m-p/2228874#M20000</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-27T21:46:45Z</dc:date>
    </item>
  </channel>
</rss>

