<?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: Make tOracleInput execute query once with tXmlMap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Make-tOracleInput-execute-query-once-with-tXmlMap/m-p/2230346#M20997</link>
    <description>Hello Sabrina, 
&lt;BR /&gt;Many thanks for your time. 
&lt;BR /&gt;I am relatively new to Talend, and your help is highly appreciated. 
&lt;BR /&gt;This is the tXmlMap component settings. 
&lt;BR /&gt; 
&lt;A href="https://community.talend.com/legacyfs/online/membersTempo/395782/xml_map.png" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MC9M.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129455iDDB27B0D29120987/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MC9M.png" alt="0683p000009MC9M.png" /&gt;&lt;/span&gt;&lt;/A&gt; 
&lt;BR /&gt;The thing is, the query is being executed multiple times. 
&lt;BR /&gt;The behavior I want, is the query being executed one time, and the result being mapped with the data. 
&lt;BR /&gt;How can I achieve such a behavior ? 
&lt;BR /&gt;Best regards, 
&lt;BR /&gt;Elias Sayegh</description>
    <pubDate>Thu, 24 Nov 2016 08:23:01 GMT</pubDate>
    <dc:creator>elias_sayegh_foo</dc:creator>
    <dc:date>2016-11-24T08:23:01Z</dc:date>
    <item>
      <title>Make tOracleInput execute query once with tXmlMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Make-tOracleInput-execute-query-once-with-tXmlMap/m-p/2230344#M20995</link>
      <description>Hello everyone, 
&lt;BR /&gt;I have the following job (see picture attached). 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MC0G.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155251i40C625672BBA0D6C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MC0G.png" alt="0683p000009MC0G.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;The data flow contains a list of invoices. I need to query the invoices due dates from a database. 
&lt;BR /&gt;The thing is, the tXmlMap component is making the tOracleInput component execute the query as many times as there is items in the main list. So if there is 10 invoices, the query is executed 10 times, and it's not the behavior I want (for the performance). 
&lt;BR /&gt;In the tJavaRow component, I built a where condition clause for the query, that I saved in a variable using the tSetEnv component, in order to use it in the tOracleInput component. So the query looks like this : 
&lt;BR /&gt; 
&lt;PRE&gt;" select invoice_number, due_date from invoices " + System.getProperty("where_clause")&lt;/PRE&gt; 
&lt;BR /&gt;So the query will only get what I want in one shot. 
&lt;BR /&gt;However the tXmlMap is executing the query several times. How can I make it execute only once and then join the result ?</description>
      <pubDate>Sat, 16 Nov 2024 10:16:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Make-tOracleInput-execute-query-once-with-tXmlMap/m-p/2230344#M20995</guid>
      <dc:creator>elias_sayegh_foo</dc:creator>
      <dc:date>2024-11-16T10:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Make tOracleInput execute query once with tXmlMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Make-tOracleInput-execute-query-once-with-tXmlMap/m-p/2230345#M20996</link>
      <description>Hi,
&lt;BR /&gt;Sorry for delay!
&lt;BR /&gt;Could you please also post your tXMLMap component setting screenshot into forum which will be helpful for us to address your issue?
&lt;BR /&gt;Best regards
&lt;BR /&gt;Sabrina</description>
      <pubDate>Thu, 17 Nov 2016 03:46:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Make-tOracleInput-execute-query-once-with-tXmlMap/m-p/2230345#M20996</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-17T03:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Make tOracleInput execute query once with tXmlMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Make-tOracleInput-execute-query-once-with-tXmlMap/m-p/2230346#M20997</link>
      <description>Hello Sabrina, 
&lt;BR /&gt;Many thanks for your time. 
&lt;BR /&gt;I am relatively new to Talend, and your help is highly appreciated. 
&lt;BR /&gt;This is the tXmlMap component settings. 
&lt;BR /&gt; 
&lt;A href="https://community.talend.com/legacyfs/online/membersTempo/395782/xml_map.png" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MC9M.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129455iDDB27B0D29120987/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MC9M.png" alt="0683p000009MC9M.png" /&gt;&lt;/span&gt;&lt;/A&gt; 
&lt;BR /&gt;The thing is, the query is being executed multiple times. 
&lt;BR /&gt;The behavior I want, is the query being executed one time, and the result being mapped with the data. 
&lt;BR /&gt;How can I achieve such a behavior ? 
&lt;BR /&gt;Best regards, 
&lt;BR /&gt;Elias Sayegh</description>
      <pubDate>Thu, 24 Nov 2016 08:23:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Make-tOracleInput-execute-query-once-with-tXmlMap/m-p/2230346#M20997</guid>
      <dc:creator>elias_sayegh_foo</dc:creator>
      <dc:date>2016-11-24T08:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Make tOracleInput execute query once with tXmlMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Make-tOracleInput-execute-query-once-with-tXmlMap/m-p/2230347#M20998</link>
      <description>You need to change the "Lookup Model" to "Load Once". This will fire the query as soon as the subjob starts and keep the data in memory instead of firing the query for every row received from the main input.</description>
      <pubDate>Thu, 24 Nov 2016 09:20:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Make-tOracleInput-execute-query-once-with-tXmlMap/m-p/2230347#M20998</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-24T09:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Make tOracleInput execute query once with tXmlMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Make-tOracleInput-execute-query-once-with-tXmlMap/m-p/2230348#M20999</link>
      <description>Hello rhall_2.0 
&lt;BR /&gt;Thank you for your reply. 
&lt;BR /&gt;This is not what I need.&amp;nbsp; 
&lt;BR /&gt;The table content is very huge, millions of records, setting the lookup model to load once is taking lots of time. 
&lt;BR /&gt;It's ok for the query to be executed for every time the job is executed, but if within the same job execution, there is 10 items in the main input, the query is being executed 10 times. 
&lt;BR /&gt;The thing is I have already set a where condition for the query before the tXmlMap component, so that the query returns the appropriate data for these 10 items. 
&lt;BR /&gt;I just have to make the query execute once per job execution.</description>
      <pubDate>Thu, 24 Nov 2016 09:24:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Make-tOracleInput-execute-query-once-with-tXmlMap/m-p/2230348#M20999</guid>
      <dc:creator>elias_sayegh_foo</dc:creator>
      <dc:date>2016-11-24T09:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Make tOracleInput execute query once with tXmlMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Make-tOracleInput-execute-query-once-with-tXmlMap/m-p/2230349#M21000</link>
      <description>OK, I get what you mean. Setting the "Reload On Each Row" is correct but you need to supply a variable for your WHERE CLAUSE on each row. To do this you use the "GlobalMap Key" functionality. Click the green cross and create a globalMap variable. Supply it with a value from your main flow that you want to use to filter your lookup query. Then use that globalMap variable in the WHERE CLAUSE of your lookup query. 
&lt;BR /&gt;I have written a tutorial which uses this functionality. Unfortunately it is not exactly what you are doing, but you should be able to extrapolate. The tutorial is here:&amp;nbsp; 
&lt;A href="https://www.rilhia.com/quicktips/quick-tip-row-multiplication" rel="nofollow noopener noreferrer"&gt;https://www.rilhia.com/quicktips/quick-tip-row-multiplication&lt;/A&gt; 
&lt;BR /&gt;Remember that your SQL Query is just a Java String. Therefore when setting your WHERE CLAUSE you can do something like this..... 
&lt;BR /&gt; 
&lt;PRE&gt;"...&lt;BR /&gt;WHERE mytable.column = '" + ((String)globalMap("MyValue"))+ "'"&lt;/PRE&gt; 
&lt;BR /&gt;Hope this helps</description>
      <pubDate>Thu, 24 Nov 2016 17:36:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Make-tOracleInput-execute-query-once-with-tXmlMap/m-p/2230349#M21000</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-24T17:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Make tOracleInput execute query once with tXmlMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Make-tOracleInput-execute-query-once-with-tXmlMap/m-p/2230350#M21001</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Hello rhall_2.0&lt;BR /&gt;Thank you for your reply.&lt;BR /&gt;This is not what I need.&amp;nbsp;&lt;BR /&gt;The table content is very huge, millions of records, setting the lookup model to load once is taking lots of time.&lt;BR /&gt;It's ok for the query to be executed for &lt;B&gt;every time the job is executed&lt;/B&gt;, but if within the same job execution, there is 10 items in the main input, the query is being executed 10 times.&lt;BR /&gt;The thing is I have already set a where condition for the query before the tXmlMap component, so that the query returns the appropriate data for these 10 items.&lt;BR /&gt;&lt;B&gt;I just have to make the query execute once per job execution.&lt;/B&gt;&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;sorry may be I miss Your idea,&amp;nbsp; 
&lt;BR /&gt;but it is exactly what suggest real_2.0! 
&lt;BR /&gt;Your current settings - will execute query 
&lt;B&gt;for each row&lt;/B&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;just add where conditions You can choose 2 method: 
&lt;BR /&gt;- make single select for small portion of table data, but cover all lookup record, and run query 
&lt;B&gt;once per job&lt;/B&gt; 
&lt;BR /&gt;- add WHERE for return data only related for single record - and run this query for each row</description>
      <pubDate>Thu, 24 Nov 2016 22:37:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Make-tOracleInput-execute-query-once-with-tXmlMap/m-p/2230350#M21001</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2016-11-24T22:37:27Z</dc:date>
    </item>
  </channel>
</rss>

