<?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: [resolved] How to use context variables in Query? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233900#M23439</link>
    <description>Works like a charm, Thanks.</description>
    <pubDate>Mon, 10 Nov 2014 08:16:45 GMT</pubDate>
    <dc:creator>satyavar</dc:creator>
    <dc:date>2014-11-10T08:16:45Z</dc:date>
    <item>
      <title>[resolved] How to use context variables in Query?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233888#M23427</link>
      <description>Hi
&lt;BR /&gt;Can some one please let me know if it is possible to update the context variables? If yes, how?
&lt;BR /&gt;and is it possible to use the context variables in Query area of a Input table object? (Not using tFilterRow)
&lt;BR /&gt;Best Regards,
&lt;BR /&gt;Kalyan</description>
      <pubDate>Tue, 04 Nov 2014 15:07:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233888#M23427</guid>
      <dc:creator>satyavar</dc:creator>
      <dc:date>2014-11-04T15:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to use context variables in Query?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233889#M23428</link>
      <description>You can update a context variable. 
&lt;BR /&gt;context.new1 = "this is some text."; 
&lt;BR /&gt;context.new1 = context.new1 + " this is some more text"; 
&lt;BR /&gt;If you want to use a context variable in a Query, then you're just using String concatenation. 
&lt;BR /&gt;"select ID, Name from " + context.myTable 
&lt;BR /&gt;of you can use String.format; which can look a little more readable sometimes.</description>
      <pubDate>Tue, 04 Nov 2014 15:46:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233889#M23428</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-04T15:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to use context variables in Query?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233890#M23429</link>
      <description>Hi&lt;BR /&gt;Thanks for your response. I am trying to access a date stored in context variable in my oracle input query to apply a where clause on date field. I get the below error, while trying to access the date field and apply it in select query:&lt;BR /&gt;I am trying to access the context variable in the following way:&lt;BR /&gt;"select col1, col2, col3dtcol from tblName where col3dtcol &amp;gt; " + context.myconfigdate&lt;BR /&gt;Exception in component tOracleInput_1&lt;BR /&gt;java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:852)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1153)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1477)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:392)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sandbox_kalyan_project.cdc_s_evt_act_0_1.CDC_S_EVT_ACT.tOracleInput_1Process(CDC_S_EVT_ACT.java:8359)&lt;BR /&gt; disconnected&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sandbox_kalyan_project.cdc_s_evt_act_0_1.CDC_S_EVT_ACT.runJobInTOS(CDC_S_EVT_ACT.java:16931)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sandbox_kalyan_project.cdc_s_evt_act_0_1.CDC_S_EVT_ACT.main(CDC_S_EVT_ACT.java:16763)&lt;BR /&gt;Best Regards,&lt;BR /&gt;Kalyan</description>
      <pubDate>Tue, 04 Nov 2014 17:22:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233890#M23429</guid>
      <dc:creator>satyavar</dc:creator>
      <dc:date>2014-11-04T17:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to use context variables in Query?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233891#M23430</link>
      <description>Hi kalyangupta,
&lt;BR /&gt;You can switch to "Code" mode to check the error java code to see if there is something wrong with your sql query
&lt;B&gt;. &lt;/B&gt;Your job setting screenshot will be preferred
&lt;BR /&gt;Best regards
&lt;BR /&gt;Sabrina</description>
      <pubDate>Wed, 05 Nov 2014 08:30:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233891#M23430</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-05T08:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to use context variables in Query?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233892#M23431</link>
      <description>Hi Kalyan,&lt;BR /&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;"select col1, col2, col3dtcol from tblName where col3dtcol &amp;gt; " + context.myconfigdate&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;gt;&amp;gt; I think the date is in string format and not in date, so try following way&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;"select col1, col2, col3dtcol from tblName where col3dtcol &amp;gt; '" + context.myconfigdate+"'"&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Also you can test above query in tjava using print statement you can identify an issue in query syntax.. use printed query in client to check the results.&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;FONT size="1"&gt;thanks&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;FONT size="1"&gt;vaibhav&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Wed, 05 Nov 2014 08:38:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233892#M23431</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-05T08:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to use context variables in Query?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233893#M23432</link>
      <description>Hi 
&lt;BR /&gt;Here is what i am trying to do. Screenshot 1 has the input columns with their data type. 2nd and 3rd screenshots has the context variable settings and 4th screenshot shows how i am trying to use context variable in Query part. 
&lt;BR /&gt;Please let me know how to access the date context variable in query part of input table to filter based on the value available in context date variable. 
&lt;BR /&gt;Best Regards, 
&lt;BR /&gt;Kalyan 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBU4.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141434iA98FD60390599530/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBU4.png" alt="0683p000009MBU4.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MAsl.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150271iB6ABE4B114199545/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MAsl.png" alt="0683p000009MAsl.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBUE.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150747iFE917944D405E643/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBUE.png" alt="0683p000009MBUE.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBUJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142350i561FF0C8CE2A3D52/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBUJ.png" alt="0683p000009MBUJ.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Thu, 06 Nov 2014 07:17:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233893#M23432</guid>
      <dc:creator>satyavar</dc:creator>
      <dc:date>2014-11-06T07:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to use context variables in Query?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233894#M23433</link>
      <description>Hi,
&lt;BR /&gt;Remove dd-mm-yyyy and semicolon part from the value section for built in context. Rest is ok.
&lt;BR /&gt;Vaibhav</description>
      <pubDate>Thu, 06 Nov 2014 07:55:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233894#M23433</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-06T07:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to use context variables in Query?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233895#M23434</link>
      <description>How do i update the it? It is readonly and i cannot update the value of context. I am selecting the value from a calendar popup which opens up.</description>
      <pubDate>Thu, 06 Nov 2014 08:00:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233895#M23434</guid>
      <dc:creator>satyavar</dc:creator>
      <dc:date>2014-11-06T08:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to use context variables in Query?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233896#M23435</link>
      <description>This might be a new change, which version of Talend are you using...
&lt;BR /&gt;- Another quick turn around is, use tPreJob--&amp;gt;tJava component and set the required value for the context variable&amp;nbsp;
&lt;BR /&gt;-&amp;nbsp;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;context.myconfigdate = ''01-01-2000";&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;And try again.&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;thanks&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Vaibhav&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Thu, 06 Nov 2014 08:07:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233896#M23435</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-06T08:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to use context variables in Query?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233897#M23436</link>
      <description>I am using 5.4.2.&lt;BR /&gt;Okay ill try your suggestion.</description>
      <pubDate>Thu, 06 Nov 2014 08:12:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233897#M23436</guid>
      <dc:creator>satyavar</dc:creator>
      <dc:date>2014-11-06T08:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to use context variables in Query?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233898#M23437</link>
      <description>Thanks Vaibhav, I have started working with your suggestion. But i would need to surpass one last hurdle to complete this job.
&lt;BR /&gt;As you suggested, I have taken the approach of PreJob -&amp;gt; Which reads the datetime from a sql table and updates a context variable of Date type.
&lt;BR /&gt;Then, i am using the context variable value to use it in where clause of a oracle table.
&lt;BR /&gt;But i am getting some exceptions like below: Exception in component tMSSqlInput_1
&lt;BR /&gt;java.sql.SQLException: Unable to convert between net.sourceforge.jtds.jdbc.DateTime and INTEGER.</description>
      <pubDate>Fri, 07 Nov 2014 08:23:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233898#M23437</guid>
      <dc:creator>satyavar</dc:creator>
      <dc:date>2014-11-07T08:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to use context variables in Query?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233899#M23438</link>
      <description>Datetime context variable set it to Date...&lt;BR /&gt;before using the query in component, use tjava and use print statement and check the correctness of the query using query browser... else make appropriate changes in the datatype or casting operations...&lt;BR /&gt;vaibhav</description>
      <pubDate>Mon, 10 Nov 2014 07:47:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233899#M23438</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-10T07:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to use context variables in Query?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233900#M23439</link>
      <description>Works like a charm, Thanks.</description>
      <pubDate>Mon, 10 Nov 2014 08:16:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-use-context-variables-in-Query/m-p/2233900#M23439</guid>
      <dc:creator>satyavar</dc:creator>
      <dc:date>2014-11-10T08:16:45Z</dc:date>
    </item>
  </channel>
</rss>

