<?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: Problems to handle context variables in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Problems-to-handle-context-variables/m-p/2345403#M112930</link>
    <description>&lt;P&gt;Now it is working. Thank you for helping me.&lt;/P&gt;&lt;P&gt;regs&lt;/P&gt;</description>
    <pubDate>Wed, 20 Sep 2017 09:48:46 GMT</pubDate>
    <dc:creator>husibilski</dc:creator>
    <dc:date>2017-09-20T09:48:46Z</dc:date>
    <item>
      <title>Problems to handle context variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problems-to-handle-context-variables/m-p/2345399#M112926</link>
      <description>&lt;P&gt;Hallo,&lt;/P&gt; 
&lt;P&gt;I'm a newbie to Talend and Java. My problem is, how use context variables in a MSSQLInput component.&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;SELECT TOP (10)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Upper([ResourceCspId])&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[Resource]&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,([Quantity]) as 'Menge'&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[ResourceGroupName] as 'ResourceGrp'&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , [CustomerName] as 'Kunde'&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;,CONVERT(VARCHAR(10), [UsageStartUtc], 105) as 'Datum'&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,'"+CSPBilling.DatumVon+"' as 'von'&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;,'"CSPBilling.DatumBis"' as 'bis'&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp;FROM [csp].[AzureKosten]&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In this example are 2 context variables &lt;SPAN&gt;CSPBilling.DatumVon&lt;/SPAN&gt;&amp;nbsp; and&amp;nbsp;&lt;SPAN&gt;CSPBilling.DatumBis. The variables are string and hold dates in the yyyy-mm-dd format. My problem is, that the variables will be replaced in runtime. I added some screenshots to show the situation (definition of the variables and result of the query. Thank you for any help.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;regs&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Hu&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Context Pararameter.jpg" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LqrX.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140458i03057E563BB2985A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LqrX.jpg" alt="0683p000009LqrX.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ContexResult.jpg" style="width: 587px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lqzx.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152078i62916804A70D79CD/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lqzx.jpg" alt="0683p000009Lqzx.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 15:48:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problems-to-handle-context-variables/m-p/2345399#M112926</guid>
      <dc:creator>husibilski</dc:creator>
      <dc:date>2017-09-15T15:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problems to handle context variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problems-to-handle-context-variables/m-p/2345400#M112927</link>
      <description>you use the object name as context and not the name of the context you have defined, so your query shud look like this
&lt;BR /&gt;"SELECT TOP (10)
&lt;BR /&gt;
&lt;BR /&gt;Upper([ResourceCspId])
&lt;BR /&gt;
&lt;BR /&gt;,[Resource]
&lt;BR /&gt;
&lt;BR /&gt;,([Quantity]) as 'Menge'
&lt;BR /&gt;
&lt;BR /&gt;,[ResourceGroupName] as 'ResourceGrp'
&lt;BR /&gt;
&lt;BR /&gt;, [CustomerName] as 'Kunde'
&lt;BR /&gt;
&lt;BR /&gt;,CONVERT(VARCHAR(10), [UsageStartUtc], 105) as 'Datum'
&lt;BR /&gt;
&lt;BR /&gt;,'"+context.DatumVon+"' as 'von'
&lt;BR /&gt;
&lt;BR /&gt;,'"+context.DatumBis+"' as 'bis'"</description>
      <pubDate>Fri, 15 Sep 2017 16:00:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problems-to-handle-context-variables/m-p/2345400#M112927</guid>
      <dc:creator>vidya821</dc:creator>
      <dc:date>2017-09-15T16:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problems to handle context variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problems-to-handle-context-variables/m-p/2345401#M112928</link>
      <description>?Hi,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;sorry it doesn't work. Same result.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Sep 2017 18:53:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problems-to-handle-context-variables/m-p/2345401#M112928</guid>
      <dc:creator>husibilski</dc:creator>
      <dc:date>2017-09-15T18:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problems to handle context variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problems-to-handle-context-variables/m-p/2345402#M112929</link>
      <description>&lt;P&gt;Can you try using "tContextLoad" component as you are loading context variables from external sources?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 19:14:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problems-to-handle-context-variables/m-p/2345402#M112929</guid>
      <dc:creator>mra802003</dc:creator>
      <dc:date>2017-09-15T19:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problems to handle context variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problems-to-handle-context-variables/m-p/2345403#M112930</link>
      <description>&lt;P&gt;Now it is working. Thank you for helping me.&lt;/P&gt;&lt;P&gt;regs&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2017 09:48:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problems-to-handle-context-variables/m-p/2345403#M112930</guid>
      <dc:creator>husibilski</dc:creator>
      <dc:date>2017-09-20T09:48:46Z</dc:date>
    </item>
  </channel>
</rss>

