<?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] Mapping output from a SQL query into variables to be used downstream in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Mapping-output-from-a-SQL-query-into-variables-to-be/m-p/2295295#M68079</link>
    <description>No - not the same question.
&lt;BR /&gt;This one is regarding how to get output from a sql query, and then map in to context variables.
&lt;BR /&gt;The other one is how to code a parameterized query.</description>
    <pubDate>Thu, 13 Aug 2009 21:56:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-08-13T21:56:12Z</dc:date>
    <item>
      <title>[resolved] Mapping output from a SQL query into variables to be used downstream</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Mapping-output-from-a-SQL-query-into-variables-to-be/m-p/2295293#M68077</link>
      <description>Scenario:
&lt;BR /&gt;(1) Need to look up values in a control table using a database input component in which the SQL query will return a single row of values, and then (2) map those values into variables to be used subsequently in a downstream process (i.e NOT connected to subsequent component using "trigger by row").
&lt;BR /&gt;In a database input component is there a way to map the results returned from the sql into variables which can be used in downstream components / subjobs, etc? 
&lt;BR /&gt;Note, that I prefer not to use stored procedures with OUT variables, as my application needs to be as database agnostic as possible.
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Dave</description>
      <pubDate>Sat, 16 Nov 2024 13:49:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Mapping-output-from-a-SQL-query-into-variables-to-be/m-p/2295293#M68077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Mapping output from a SQL query into variables to be used downstream</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Mapping-output-from-a-SQL-query-into-variables-to-be/m-p/2295294#M68078</link>
      <description>the same question in 7763.
&lt;BR /&gt;Best regards
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Thu, 13 Aug 2009 03:32:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Mapping-output-from-a-SQL-query-into-variables-to-be/m-p/2295294#M68078</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-08-13T03:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Mapping output from a SQL query into variables to be used downstream</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Mapping-output-from-a-SQL-query-into-variables-to-be/m-p/2295295#M68079</link>
      <description>No - not the same question.
&lt;BR /&gt;This one is regarding how to get output from a sql query, and then map in to context variables.
&lt;BR /&gt;The other one is how to code a parameterized query.</description>
      <pubDate>Thu, 13 Aug 2009 21:56:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Mapping-output-from-a-SQL-query-into-variables-to-be/m-p/2295295#M68079</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-08-13T21:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Mapping output from a SQL query into variables to be used downstream</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Mapping-output-from-a-SQL-query-into-variables-to-be/m-p/2295296#M68080</link>
      <description>David,
&lt;BR /&gt;How many result do you have from your SQLQuery ?
&lt;BR /&gt;If you have just once, you can probably use a tJava just after your SQLQuery output component, and assign the value like this : 
&lt;BR /&gt;context.myVariable1 = row1.field1;
&lt;BR /&gt;context.myVariable2 = row1.field2;
&lt;BR /&gt;
&lt;BR /&gt;* myVariable1 is your context variable created into the context tab.
&lt;BR /&gt;* row1is the name of the link row linked to the tJava component.
&lt;BR /&gt;* field1 the name of the metadata schema column value return by the SQLQuery.
&lt;BR /&gt;Best regards;</description>
      <pubDate>Fri, 14 Aug 2009 00:09:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Mapping-output-from-a-SQL-query-into-variables-to-be/m-p/2295296#M68080</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-08-14T00:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Mapping output from a SQL query into variables to be used downstream</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Mapping-output-from-a-SQL-query-into-variables-to-be/m-p/2295297#M68081</link>
      <description>I'm try to do the same thing, but it doesn't work... 
&lt;BR /&gt;First in a tMySQLInput i get the unique result of the following query : 
&lt;BR /&gt; 
&lt;PRE&gt;select fullfilelines.COMPANY,fullfilelines.DATE_,fullfilelines.LINES &lt;BR /&gt;from fullfilelines &lt;BR /&gt;where fullfilelines.COMPANY = '" + context.COMPANY_CODE + "' &lt;BR /&gt;order by DATE_ DESC limit 0,1&lt;/PRE&gt; 
&lt;BR /&gt;i need to push the DATE_ result (declared as DATE_ with the following date pattern 'yyyyMMdd') to a context variable called DATE_ 
&lt;BR /&gt;i'm trying to use the following code into the tJava : 
&lt;BR /&gt; 
&lt;PRE&gt;context.START_DATE = Last_Date.DATE_;&lt;/PRE&gt; 
&lt;BR /&gt;But when i try to retrive the value for context.START_DATE it seems that tJava assigned a null value 
&lt;BR /&gt;I've test the output of the query with a tLogRow and it runs. 
&lt;BR /&gt; 
&lt;A href="http://img513.imageshack.us/i/job.png/" target="_blank" rel="nofollow noopener noreferrer"&gt;&lt;IMG src="https://community.qlik.com/" /&gt;&lt;/A&gt; 
&lt;BR /&gt;An idea on how to put simply the field values into context variable when having one ounique row as a result. 
&lt;BR /&gt;I've already done that with tFlowtoIterate when managing several rows as result but when there is only one, is there a smarter way to do?</description>
      <pubDate>Thu, 03 Sep 2009 07:15:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Mapping-output-from-a-SQL-query-into-variables-to-be/m-p/2295297#M68081</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-03T07:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Mapping output from a SQL query into variables to be used downstream</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Mapping-output-from-a-SQL-query-into-variables-to-be/m-p/2295298#M68082</link>
      <description>In fact this code seems not running properly :&lt;BR /&gt;&lt;PRE&gt;context.START_DATE = Last_Date.DATE_;&lt;/PRE&gt;&lt;BR /&gt;because when i call Last_Date.DATE_ with an msgbox i have the right values.</description>
      <pubDate>Thu, 03 Sep 2009 08:48:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Mapping-output-from-a-SQL-query-into-variables-to-be/m-p/2295298#M68082</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-03T08:48:43Z</dc:date>
    </item>
  </channel>
</rss>

