<?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 Load value dynamically to tSampleRow in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Load-value-dynamically-to-tSampleRow/m-p/2345930#M113389</link>
    <description>&lt;DIV class="lia-quilt-column lia-quilt-column-18 lia-quilt-column-left lia-quilt-column-main-left"&gt;
 &lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-left"&gt;
  &lt;DIV class="lia-message-body lia-component-body-signature-highlight-escalation"&gt;
   &lt;DIV class="lia-message-body-content"&gt;
    &lt;P&gt;I have a input file with 10 columns and a simple tmap which process the 10 columns and send it to tSampleRow where i hardcoded and to output file. It works fine.&amp;nbsp;&lt;/P&gt;
    &lt;P&gt;Now i need to change the value of tSampleRow dynamically ( fetch value from database and set in context variable) and use the context variable in tSampleRow.&lt;/P&gt;
    &lt;P&gt;1. Job&lt;/P&gt;
    &lt;P&gt;2. ChildJob ( for loading context variable ) which works fine&lt;/P&gt;
    &lt;P&gt;3. tRunJob&lt;/P&gt;
    &lt;P&gt;4. tSampleRow&lt;/P&gt;
    &lt;P&gt;&amp;nbsp;&lt;/P&gt;
    &lt;P&gt;Can you help me how to give the value in tSampleRow and What should i assign in tRunJob Context column.&lt;/P&gt;
    &lt;P&gt;&amp;nbsp;&lt;/P&gt;
    &lt;P&gt;Child Job works fine :&lt;/P&gt;
    &lt;P&gt;System.out.println("hi");&lt;/P&gt;
    &lt;P&gt;System.out.println(context.rows);&lt;/P&gt;
    &lt;P&gt;globalMap.put("output",context.rows);&lt;/P&gt;
    &lt;P&gt;System.out.println((String)globalMap.get("output"));&lt;/P&gt;
    &lt;P&gt;&amp;nbsp;&lt;/P&gt;
    &lt;P&gt;Starting job DatabaseJob at 15:32 03/04/2018.&lt;/P&gt;
    &lt;P&gt;[statistics] connecting to socket on port 3705&lt;BR /&gt;[statistics] connected&lt;BR /&gt;tContextLoad_4 set key "days" with value "monday"&lt;BR /&gt;tContextLoad_4 set key "rows" with value "5"&lt;BR /&gt;hi&lt;BR /&gt;5&lt;BR /&gt;5&lt;BR /&gt;[statistics] disconnected&lt;BR /&gt;Job DatabaseJob ended at 15:32 03/04/2018. [exit code=0]&lt;/P&gt;
    &lt;DIV&gt;
     &amp;nbsp;
    &lt;/DIV&gt;
   &lt;/DIV&gt;
  &lt;/DIV&gt;
 &lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Sat, 16 Nov 2024 08:28:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T08:28:14Z</dc:date>
    <item>
      <title>Load value dynamically to tSampleRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Load-value-dynamically-to-tSampleRow/m-p/2345930#M113389</link>
      <description>&lt;DIV class="lia-quilt-column lia-quilt-column-18 lia-quilt-column-left lia-quilt-column-main-left"&gt;
 &lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-left"&gt;
  &lt;DIV class="lia-message-body lia-component-body-signature-highlight-escalation"&gt;
   &lt;DIV class="lia-message-body-content"&gt;
    &lt;P&gt;I have a input file with 10 columns and a simple tmap which process the 10 columns and send it to tSampleRow where i hardcoded and to output file. It works fine.&amp;nbsp;&lt;/P&gt;
    &lt;P&gt;Now i need to change the value of tSampleRow dynamically ( fetch value from database and set in context variable) and use the context variable in tSampleRow.&lt;/P&gt;
    &lt;P&gt;1. Job&lt;/P&gt;
    &lt;P&gt;2. ChildJob ( for loading context variable ) which works fine&lt;/P&gt;
    &lt;P&gt;3. tRunJob&lt;/P&gt;
    &lt;P&gt;4. tSampleRow&lt;/P&gt;
    &lt;P&gt;&amp;nbsp;&lt;/P&gt;
    &lt;P&gt;Can you help me how to give the value in tSampleRow and What should i assign in tRunJob Context column.&lt;/P&gt;
    &lt;P&gt;&amp;nbsp;&lt;/P&gt;
    &lt;P&gt;Child Job works fine :&lt;/P&gt;
    &lt;P&gt;System.out.println("hi");&lt;/P&gt;
    &lt;P&gt;System.out.println(context.rows);&lt;/P&gt;
    &lt;P&gt;globalMap.put("output",context.rows);&lt;/P&gt;
    &lt;P&gt;System.out.println((String)globalMap.get("output"));&lt;/P&gt;
    &lt;P&gt;&amp;nbsp;&lt;/P&gt;
    &lt;P&gt;Starting job DatabaseJob at 15:32 03/04/2018.&lt;/P&gt;
    &lt;P&gt;[statistics] connecting to socket on port 3705&lt;BR /&gt;[statistics] connected&lt;BR /&gt;tContextLoad_4 set key "days" with value "monday"&lt;BR /&gt;tContextLoad_4 set key "rows" with value "5"&lt;BR /&gt;hi&lt;BR /&gt;5&lt;BR /&gt;5&lt;BR /&gt;[statistics] disconnected&lt;BR /&gt;Job DatabaseJob ended at 15:32 03/04/2018. [exit code=0]&lt;/P&gt;
    &lt;DIV&gt;
     &amp;nbsp;
    &lt;/DIV&gt;
   &lt;/DIV&gt;
  &lt;/DIV&gt;
 &lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:28:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Load-value-dynamically-to-tSampleRow/m-p/2345930#M113389</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T08:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Load value dynamically to tSampleRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Load-value-dynamically-to-tSampleRow/m-p/2345931#M113390</link>
      <description>&lt;P&gt;Hi Dinesh,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Are you looking for this ?&lt;/P&gt; 
&lt;P&gt;You need to define context value in DB. like key=rows and value=1..5&lt;/P&gt; 
&lt;P&gt;assign this using context load in job and use context.rows in tSampleRow.&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="ContextSampleRow1.png" style="width: 641px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LssZ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137274i1515893F79768D77/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LssZ.png" alt="0683p000009LssZ.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ContextSampleRow2.png" style="width: 718px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LtBH.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145266i4039F0A86870A3ED/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LtBH.png" alt="0683p000009LtBH.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 17:24:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Load-value-dynamically-to-tSampleRow/m-p/2345931#M113390</guid>
      <dc:creator>vboppudi</dc:creator>
      <dc:date>2018-04-03T17:24:16Z</dc:date>
    </item>
  </channel>
</rss>

