<?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] Join to 1 or the other table in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360505#M125067</link>
    <description>&lt;FONT size="2"&gt;&lt;FONT face="Verdana," sans-serif=""&gt;Hi,&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;I want to create a CSV file with data always from table A. Also based on a value in each row from table A get a row from table B or C. There are 2 values of concern in table A. ID and alternate number (alt_no). In all cases there will be a row in B where A.ID = A.ID &amp;nbsp;Yet when A.alt_no is &amp;gt; 0&amp;nbsp;&amp;nbsp;we want values from the alternate table C where C.ID = A.ID and C.alt_no = A.alt_no. &amp;nbsp;Furthermore&amp;nbsp;the CSV file will have 1 column from table B or C. For example get the value for CSV column name city from B or C depending on which one was used. &lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana," sans-serif=""&gt;Could you please elaborate your case with an example with input and expected output values?&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana," sans-serif=""&gt;Best regards&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana," sans-serif=""&gt;Sabrina&lt;/FONT&gt;&lt;/FONT&gt;</description>
    <pubDate>Fri, 31 Mar 2017 03:50:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-03-31T03:50:31Z</dc:date>
    <item>
      <title>[resolved] Join to 1 or the other table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360504#M125066</link>
      <description>&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT size="1"&gt;&lt;FONT face="Arial,"&gt;How do I do this in Talend Studio? What components will allow me to get the desired results?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[color=#000000][font=Arial, Helvetica, sans-serif]&lt;FONT size="1"&gt;&amp;nbsp;I expect there is a recommend method to accomplish&amp;nbsp;this task.&amp;nbsp;&lt;/FONT&gt;[/font][/color]&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;FONT size="1"&gt;&lt;FONT face="Arial,"&gt;I want to create a CSV file with data always from table A. Also based on a value in each row from table A get a row from table B or C. There are 2 values of concern in table A. ID and alternate number (alt_no). In all cases there will be a row in B where A.ID = A.ID &amp;nbsp;Yet when A.alt_no is &amp;gt; 0&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[color=#000000][font=Arial, Helvetica, sans-serif]&lt;FONT size="1"&gt;&amp;nbsp;we want values from the alternate table C where C.ID = A.ID and C.alt_no = A.alt_no. &amp;nbsp;Furthermore&amp;nbsp;the CSV file will have 1 column from table B or C. For example get the value for CSV column name city from B or C depending on which one was used.&amp;nbsp;&lt;/FONT&gt;[/font][/color]&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;FONT size="1"&gt;&lt;FONT face="Arial,"&gt;My 1st idea is to use tJDBCInput for the 3 tables and have them go into tMap. Then use the expression editor to select the desired rows with a left outer join.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;&lt;FONT size="1"&gt;&lt;FONT face="Arial,"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;&lt;FONT size="1"&gt;&lt;FONT face="Arial,"&gt;I have not discovered a way to build the expression to work this way.&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;Talend integration cloud SaaS edition of Talend studio version 6.3&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 18:33:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360504#M125066</guid>
      <dc:creator>BremmeyrISS</dc:creator>
      <dc:date>2017-03-30T18:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Join to 1 or the other table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360505#M125067</link>
      <description>&lt;FONT size="2"&gt;&lt;FONT face="Verdana," sans-serif=""&gt;Hi,&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;I want to create a CSV file with data always from table A. Also based on a value in each row from table A get a row from table B or C. There are 2 values of concern in table A. ID and alternate number (alt_no). In all cases there will be a row in B where A.ID = A.ID &amp;nbsp;Yet when A.alt_no is &amp;gt; 0&amp;nbsp;&amp;nbsp;we want values from the alternate table C where C.ID = A.ID and C.alt_no = A.alt_no. &amp;nbsp;Furthermore&amp;nbsp;the CSV file will have 1 column from table B or C. For example get the value for CSV column name city from B or C depending on which one was used. &lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana," sans-serif=""&gt;Could you please elaborate your case with an example with input and expected output values?&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana," sans-serif=""&gt;Best regards&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana," sans-serif=""&gt;Sabrina&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Fri, 31 Mar 2017 03:50:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360505#M125067</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-31T03:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Join to 1 or the other table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360506#M125068</link>
      <description>Are all three tables in the same database?&amp;nbsp; If so, I would forget about bringing the tables into a tMap and joining them up that way.&amp;nbsp; Talend does not currently pushdown any database operations based on the design flow.&amp;nbsp; It is a code generator not a code/sql generator.&amp;nbsp; For the sake of performance, push down as much DB operations as you can and let the database do what it is designed to do.&amp;nbsp; Based on what you said and the assumption that all tables are from the same database, think of it in terms of SQL: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;SELECT A.*, B.CITY&lt;BR /&gt;FROM TABLEA A&lt;BR /&gt; &amp;nbsp;INNER JOIN TABLEB B&lt;BR /&gt; &amp;nbsp; &amp;nbsp;ON A.ID = B.ID&lt;BR /&gt;WHERE A.ALT_NO &amp;lt;= 0&lt;BR /&gt;&lt;BR /&gt;UNION ALL&lt;BR /&gt;&lt;BR /&gt;SELECT A.*, C.CITY&lt;BR /&gt;FROM TABLEA A&lt;BR /&gt; &amp;nbsp;INNER JOIN TABLEC C&lt;BR /&gt; &amp;nbsp; &amp;nbsp;ON &amp;nbsp; &amp;nbsp;A.ID = C.ID&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND A.ALT_NO = C.ALT_NO&lt;BR /&gt;WHERE A.ALT_NO &amp;gt; 0&lt;/PRE&gt; 
&lt;BR /&gt;If that is the type of results you are looking for, stick that query in a SQLInput component, add a tMap if any other data manipulation is needed and add you CSVOutputFile component. 
&lt;BR /&gt; 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Scott</description>
      <pubDate>Fri, 31 Mar 2017 16:14:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360506#M125068</guid>
      <dc:creator>TXAggie00</dc:creator>
      <dc:date>2017-03-31T16:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Join to 1 or the other table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360507#M125069</link>
      <description>I think that will work
&lt;B&gt;&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana," helvetica=""&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&amp;nbsp;I will give it a try. Thank you Scott.&amp;nbsp;</description>
      <pubDate>Fri, 31 Mar 2017 17:33:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360507#M125069</guid>
      <dc:creator>BremmeyrISS</dc:creator>
      <dc:date>2017-03-31T17:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Join to 1 or the other table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360508#M125070</link>
      <description>Yes, Yes, YES. &amp;nbsp;Thank you Scott. That worked just the way I want. &amp;nbsp;My take away is right on target with your explanation. Selection values, joins, etc. &amp;nbsp;can be added to the SQL of the &amp;nbsp;tJDBCInput component.&amp;nbsp;
&lt;BR /&gt;I recall from somewhere that it is better to split up the table access in the job with multiple tJDBCInput components. That is the main reason I was trying to join or merge the data with tMap. &amp;nbsp;At this point with this job I will take whatever works. I think that idea was in the context of planning to deploy the job with TIC - Taland Integration Cloud.&amp;nbsp;</description>
      <pubDate>Fri, 31 Mar 2017 19:22:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360508#M125070</guid>
      <dc:creator>BremmeyrISS</dc:creator>
      <dc:date>2017-03-31T19:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Join to 1 or the other table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360509#M125071</link>
      <description>Glad it worked for you.&amp;nbsp; 
&lt;BR /&gt; 
&lt;BR /&gt;I think as a general ETL architecture design, I agree with what you read: it 
&lt;B&gt;&lt;I&gt;should &lt;/I&gt;&lt;/B&gt;be split up for maintainability reasons and to put the business logic as part of the design.&amp;nbsp; One thing I have learned about Talend as compared to other Gartner Q1 ETL tools, is that Talend is not as efficient in this regard.&amp;nbsp; Most tools recognize the use of tables from the same datastore/database and generate the necessary SQL code to make it as efficient as possible and to push down most of the heavy lifting to the database.&amp;nbsp; This frees up precious memory to do actual transformations of your data.&amp;nbsp; Talend, on the otherhand, just generates java code on a component by component basis and will, too many times, use a lot of server resources that could otherwise be done at the db level.&amp;nbsp; Unless they are on different sources, I use pure SQL and then manipulate/transform as needed in the job.&amp;nbsp; Even if they are different source databases, I usually (depending on the size) load into temp tables on the target DB and use the ELT components or SQL based query to derive my true source recordset. Performance and optimization is just as important to ETL architecture as is the defined business logic for the data integration.&amp;nbsp; 
&lt;BR /&gt; 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Scott</description>
      <pubDate>Fri, 31 Mar 2017 19:41:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360509#M125071</guid>
      <dc:creator>TXAggie00</dc:creator>
      <dc:date>2017-03-31T19:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Join to 1 or the other table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360510#M125072</link>
      <description>In the tMap component there is a filter expression option. Can that be used in effect the same way as a where clause in SQL ?</description>
      <pubDate>Fri, 31 Mar 2017 20:47:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360510#M125072</guid>
      <dc:creator>BremmeyrISS</dc:creator>
      <dc:date>2017-03-31T20:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Join to 1 or the other table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360511#M125073</link>
      <description>Yep, sure can.&amp;nbsp; You can use it on the input or any output.
&lt;BR /&gt;
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Scott</description>
      <pubDate>Fri, 31 Mar 2017 20:50:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360511#M125073</guid>
      <dc:creator>TXAggie00</dc:creator>
      <dc:date>2017-03-31T20:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Join to 1 or the other table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360512#M125074</link>
      <description>Thank you.</description>
      <pubDate>Mon, 03 Apr 2017 19:07:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Join-to-1-or-the-other-table/m-p/2360512#M125074</guid>
      <dc:creator>BremmeyrISS</dc:creator>
      <dc:date>2017-04-03T19:07:59Z</dc:date>
    </item>
  </channel>
</rss>

