<?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: What is the best practice for tMap if multiple parameters point to id of same lookup table? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/What-is-the-best-practice-for-tMap-if-multiple-parameters-point/m-p/2327719#M97077</link>
    <description>&lt;P&gt;Of course, makes sense. Thank you!&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2022 05:34:55 GMT</pubDate>
    <dc:creator>jvesely</dc:creator>
    <dc:date>2022-10-17T05:34:55Z</dc:date>
    <item>
      <title>What is the best practice for tMap if multiple parameters point to id of same lookup table?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/What-is-the-best-practice-for-tMap-if-multiple-parameters-point/m-p/2327717#M97075</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a legacy datamodel that I cannot change (and didn't design aka "it wasn't me" &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; ) . There's many tables but this question is about following situation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 1 (source)&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;id&lt;/LI&gt;&lt;LI&gt;fk1 to table 2&lt;/LI&gt;&lt;LI&gt;fk2 to table 2 &lt;/LI&gt;&lt;LI&gt;fk3 to table 2&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 2 (lookup)&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;id&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further, if fk1 has a value, fk2 and fk3 are null. If fk2 has a value, fk1 and dfk3 are null etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to delete records from table 1 that do not point to any valid record in table 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can think of 2 approaches to do this:&lt;/P&gt;&lt;P&gt;1) Use table 2 in 3 lookups, meaning the tMap will have Table 1 as input and 3 (copy &amp;amp; paste) lookups op Table 2&lt;/P&gt;&lt;P&gt;2) Actually twist the situation: Use table 2 as source table and table 1 as lookup&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd hate to use method 1 as I hate copy &amp;amp; paste. Method 2 seems like it could work (need to test this though).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But is there an even better approach for situations like this? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If my question isn't clear, let me know and I'll try to write it in a different way / add a screenshot&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:27:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/What-is-the-best-practice-for-tMap-if-multiple-parameters-point/m-p/2327717#M97075</guid>
      <dc:creator>jvesely</dc:creator>
      <dc:date>2024-11-15T22:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best practice for tMap if multiple parameters point to id of same lookup table?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/What-is-the-best-practice-for-tMap-if-multiple-parameters-point/m-p/2327718#M97076</link>
      <description>&lt;P&gt;So only 1 of the FK column is populated from the 3?&lt;/P&gt;&lt;P&gt;This means if you'd do a coalesce(fk1,fk2,fk3) as fk  you could simply join Table 2. (There's no coalesce in java but it can be easily done.)&lt;/P&gt;&lt;P&gt;( fk1 != null ? fk1 : (fk2 != null ? fk2 : fk3) )   -&amp;gt; table2.id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you want to do a LEFT Join inside tMap, (by default it's kind of INNER join) and then filter for the lookup being null.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 16:26:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/What-is-the-best-practice-for-tMap-if-multiple-parameters-point/m-p/2327718#M97076</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-14T16:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best practice for tMap if multiple parameters point to id of same lookup table?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/What-is-the-best-practice-for-tMap-if-multiple-parameters-point/m-p/2327719#M97077</link>
      <description>&lt;P&gt;Of course, makes sense. Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 05:34:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/What-is-the-best-practice-for-tMap-if-multiple-parameters-point/m-p/2327719#M97077</guid>
      <dc:creator>jvesely</dc:creator>
      <dc:date>2022-10-17T05:34:55Z</dc:date>
    </item>
  </channel>
</rss>

