<?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: OR operator across joins in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213064#M10458</link>
    <description>ok i got it . 
&lt;BR /&gt;Just using the globalMap.get() func to access the values! 
&lt;BR /&gt;Thanks a ton Volker 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;</description>
    <pubDate>Tue, 26 Aug 2008 12:00:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-08-26T12:00:32Z</dc:date>
    <item>
      <title>OR operator across joins</title>
      <link>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213052#M10446</link>
      <description>My query is something like this:-
&lt;BR /&gt;I need to perform this join only if any of the a,b,c,d values are NULL in table t1.
&lt;BR /&gt;And if they are null , i do a lookup for them in table t2.
&lt;BR /&gt;Select a,b,c,d from table t1,table t2 where t1.a=t2.a OR t1.b=t2.b AND t1.c=t2.c OR t1.d=t2.d.
&lt;BR /&gt;I perform this query using a tMap . 
&lt;BR /&gt;How can i do this in my expression builder. Is it possible to have OR operator across joins being made for various columns?</description>
      <pubDate>Sat, 16 Nov 2024 14:15:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213052#M10446</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T14:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: OR operator across joins</title>
      <link>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213053#M10447</link>
      <description>Hello 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;How can i do this in my expression builder. Is it possible to have OR operator across joins being made for various columns?&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;In expression builder of tMap, try '||' for or operator, '&amp;amp;&amp;amp;' for and operator. for example: 
&lt;BR /&gt; 
&lt;PRE&gt;(row1.a==row2.a||row1.b==row2.b)&amp;amp;&amp;amp;(row1.c==row2.c||row1.d==row2.d)&lt;/PRE&gt; 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; shong</description>
      <pubDate>Fri, 22 Aug 2008 06:48:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213053#M10447</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-22T06:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: OR operator across joins</title>
      <link>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213054#M10448</link>
      <description>Thanks Shong .... 
&lt;BR /&gt;The table t2 , which is being used to do a lookup just in case any value in table t1 is null. 
&lt;BR /&gt;Now this table t2 has some 8 millions rows. Talend first reads the entire table t2 ??? Which takes a lot of time. 
&lt;BR /&gt;I just want a lookup to happen , if after reading table t1 , it finds that any of the value is null(This condition is specified in the expression builder or row1). 
&lt;BR /&gt;Then , A join is being made between these two tables as suggested by you (in the expression builder of row2 (table t2)) 
&lt;BR /&gt;And if a join is being made, the output table (say op1) has all the fields of row1 mapped to it , except fields a,b,c,d (any of which might be null , which invokes this join) 
&lt;BR /&gt;If none of the fields of table t1 is null, i don want any join to happen .... 
&lt;BR /&gt;here is how my job looks like:</description>
      <pubDate>Fri, 22 Aug 2008 07:50:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213054#M10448</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-22T07:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: OR operator across joins</title>
      <link>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213055#M10449</link>
      <description>Hi aviator,&lt;BR /&gt;hard to understand (for me). Can you please give a example (with data) and a screen shot of your tMap component. &lt;BR /&gt;Bye&lt;BR /&gt;Volker</description>
      <pubDate>Fri, 22 Aug 2008 08:49:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213055#M10449</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-22T08:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: OR operator across joins</title>
      <link>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213056#M10450</link>
      <description>Have attached my job and tmap .. however these images may be wrong, So please go through the pains of reading some explanation of what i wish to do . Thanks a ton for your help! 
&lt;BR /&gt; 
&lt;BR /&gt;1. Read from t1 continously and aggregate data further. 
&lt;BR /&gt;However : If any field values from t1 is null , do a lookup from table t2 . 
&lt;BR /&gt;Where should i check if any of the values of columns coming from t1 are null .... As per the tmap shown , i did it in expression builder of row1. 
&lt;BR /&gt;Now , if any of values of t1 are null , i use my tmap to do lookup for those fields based on : (row1.trackAolId==row3.track_aol_id) or(row1. trackTitle==row3.track_title)) And ((row1.albumAolId==row3.album_aol_id)||(row1.albumTitle==row3.album_title)) and so on... 
&lt;BR /&gt;Where do i put this condition , i put it in row3's expression builder. 
&lt;BR /&gt; 
&lt;BR /&gt;Does my job diagram fulfill my purpose. 
&lt;BR /&gt;The problem is , this job starts with reading all the rows of table t2 ...... and then reads t1 .. performs a join and so on.... 
&lt;BR /&gt;I want this to be like : firsgt read t1 , everytime you encounter a null column value , do a lookup from table t2 and carry with the aggregation........ 
&lt;BR /&gt;Is some kind of iteration also involved here ? 
&lt;BR /&gt;Can you gimme some ideas as to how my job can be designed to achieve all of this.</description>
      <pubDate>Fri, 22 Aug 2008 09:33:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213056#M10450</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-22T09:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: OR operator across joins</title>
      <link>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213057#M10451</link>
      <description>images&lt;BR /&gt;have cut the tmap into two images . could not paste together due to size constraints</description>
      <pubDate>Fri, 22 Aug 2008 09:36:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213057#M10451</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-22T09:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: OR operator across joins</title>
      <link>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213058#M10452</link>
      <description>any help to a newbie in Talend ?</description>
      <pubDate>Fri, 22 Aug 2008 11:24:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213058#M10452</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-22T11:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: OR operator across joins</title>
      <link>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213059#M10453</link>
      <description>Hi aviator,
&lt;BR /&gt;my suggestion would be:
&lt;BR /&gt;Because TOS does not support a back propagation of any values from the tMap to the lookup row I would use two steps.
&lt;BR /&gt;first part:
&lt;BR /&gt; tDBInput(t1) -&amp;gt; tFilterRow(check for missing fields) -&amp;gt; allFieldsOk -&amp;gt; tFileOutput(tempFile1)
&lt;BR /&gt; 
&lt;BR /&gt;-&amp;gt; fieldsNotOk -&amp;gt; tFlowToIterate -&amp;gt; tDBInput(dynamic SQL to read one row with missing data from table2) -&amp;gt; tMap (1::1-mapping output metadata like your hhh-connection, value set by input row for missing values or read from the globalMap for the primary row) -&amp;gt; tFileOutput(tempFile2)
&lt;BR /&gt;second part:
&lt;BR /&gt;tFileInput(tempFile1) 
&lt;BR /&gt; |--&amp;gt; tJoin -&amp;gt; your flow based on all completed values
&lt;BR /&gt;tFileInput(tempFile2)
&lt;BR /&gt;With this you avoid the prefetch of the data of table2</description>
      <pubDate>Fri, 22 Aug 2008 20:39:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213059#M10453</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-22T20:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: OR operator across joins</title>
      <link>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213060#M10454</link>
      <description>Ok Thanks ! 
&lt;BR /&gt;Is this what u mean , have attached a image , please check it.... 
&lt;BR /&gt;This does not help ... the job starts reading my mysqlinput_3 (a table of 8 million rows ) first ....... 
&lt;BR /&gt;But i want this to be read only if some null values are encountered from input_1 and a rejected values are sent through the filter.... 
&lt;BR /&gt; 
&lt;BR /&gt;IDEAS ??? THOUGHTS??? 
&lt;BR /&gt; 
&lt;BR /&gt;Other option: (Just in case the above suggested does not work ) 
&lt;BR /&gt;or can i write a routine , that takes as input the rows returned by t1 and checks for null fields, if any field is null-it just performs a lookup in the table t2 .........creates a temporary table and updates all the null fields after lookup from t2.... and then carries on the aggregation</description>
      <pubDate>Mon, 25 Aug 2008 06:11:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213060#M10454</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-25T06:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: OR operator across joins</title>
      <link>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213061#M10455</link>
      <description>any help ?</description>
      <pubDate>Mon, 25 Aug 2008 14:52:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213061#M10455</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-25T14:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: OR operator across joins</title>
      <link>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213062#M10456</link>
      <description>Hello aviator, 
&lt;BR /&gt;remove tMysqlInput_3. You don't need it in my example. Select your data from your "8-million-table" in tMysqlInput_2 with a dedicated sql. In the tMap you need only one input and one output. 
&lt;BR /&gt;Bye 
&lt;BR /&gt;Volker</description>
      <pubDate>Mon, 25 Aug 2008 20:31:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213062#M10456</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-25T20:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: OR operator across joins</title>
      <link>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213063#M10457</link>
      <description>Hi Volker, 
&lt;BR /&gt;Is this what u are saying(attached an image below.) 
&lt;BR /&gt;The problem is , my query for mysqlinput_2 would be something like this: 
&lt;BR /&gt;"select track_aol_id,track_title,track_number,album_aol_id, 
&lt;BR /&gt;album_title,artist_aol_id,artist_name from audio_main_song 
&lt;BR /&gt;where 
&lt;BR /&gt;track_title=row8.trackTitle OR track_aol_id=row8.trackAolId 
&lt;BR /&gt;AND 
&lt;BR /&gt;artist_name=row8.artistName OR artist_aol_id=row8.artistAolId 
&lt;BR /&gt;And 
&lt;BR /&gt;album_title=row8.albumTitle OR album_aol_id=row8.albumAolId limit 1" 
&lt;BR /&gt;Can i refer row8 fields here ??? (The rejected values) because i need to have them in my where clause while doing a lookup in my "8 million table" 
&lt;BR /&gt;I get a error when i do this-----&amp;gt; 
&lt;BR /&gt;Exception in component tMysqlInput_2 
&lt;BR /&gt;com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'row8.trackTitle' in 'where clause' 
&lt;BR /&gt;Also in my tmap : apart from the fields that i am getting from mysqlinput_2, i need row8's rejected fields also (not all of them are null) 
&lt;BR /&gt;Can i do that ?? 
&lt;BR /&gt;Any inputs please ?</description>
      <pubDate>Tue, 26 Aug 2008 07:35:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213063#M10457</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-26T07:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: OR operator across joins</title>
      <link>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213064#M10458</link>
      <description>ok i got it . 
&lt;BR /&gt;Just using the globalMap.get() func to access the values! 
&lt;BR /&gt;Thanks a ton Volker 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Tue, 26 Aug 2008 12:00:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/OR-operator-across-joins/m-p/2213064#M10458</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-26T12:00:32Z</dc:date>
    </item>
  </channel>
</rss>

