<?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] Union All in tMap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265068#M44726</link>
    <description>Thanks shong, 
&lt;BR /&gt;I'll be using the output again to a select statement. Here's what I am trying to pertain for visualization. 
&lt;BR /&gt; 
&lt;BR /&gt;SELECT //HERE IS MY MAIN SQL STATEMENT 
&lt;BR /&gt;. 
&lt;BR /&gt;. 
&lt;BR /&gt;. 
&lt;BR /&gt;FROM 
&lt;BR /&gt;( 
&lt;BR /&gt; SELECT // This is my first table 
&lt;BR /&gt; . // my first tInputDB 
&lt;BR /&gt; . 
&lt;BR /&gt; . 
&lt;BR /&gt; FROM 
&lt;BR /&gt; ...... 
&lt;BR /&gt; 
&lt;BR /&gt; UNION ALL // Here what will I use here? tMap or tUnite??? 
&lt;BR /&gt; 
&lt;BR /&gt; SELECT //This is my second table 
&lt;BR /&gt; . // my second InputDB 
&lt;BR /&gt; . 
&lt;BR /&gt; . 
&lt;BR /&gt; FROM 
&lt;BR /&gt; ............ 
&lt;BR /&gt;) tbl 
&lt;BR /&gt;FROM 
&lt;BR /&gt;... 
&lt;BR /&gt;LEFT JOIN 
&lt;BR /&gt;....... 
&lt;BR /&gt;WHERE 
&lt;BR /&gt;....... 
&lt;BR /&gt;ORDER BY 
&lt;BR /&gt;...... 
&lt;BR /&gt; 
&lt;BR /&gt;They have different schema so in that case tUnite is not an option ,I hope you get the hit, Help me out. 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;-D</description>
    <pubDate>Wed, 04 May 2011 07:58:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-05-04T07:58:24Z</dc:date>
    <item>
      <title>[resolved] Union All in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265064#M44722</link>
      <description>How can I Union All the two tables in tMap?</description>
      <pubDate>Sat, 16 Nov 2024 12:56:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265064#M44722</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Union All in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265065#M44723</link>
      <description>Hi
&lt;BR /&gt;Try the tUnite component, eg:
&lt;BR /&gt;tMysqlInput_1--main--tUnite--tMap
&lt;BR /&gt; |
&lt;BR /&gt; tMysqlInput_2
&lt;BR /&gt;Best regards
&lt;BR /&gt;Shong</description>
      <pubDate>Tue, 03 May 2011 07:27:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265065#M44723</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-03T07:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Union All in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265066#M44724</link>
      <description>Hi shong, 
&lt;BR /&gt;Based on my question , Is it possible that they have different schema. 
&lt;BR /&gt;This is actually i want to apply in JasperETL
&lt;BR /&gt;I have two select statement and I'm going to union all that two result of the two sql statement.</description>
      <pubDate>Tue, 03 May 2011 08:25:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265066#M44724</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-03T08:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Union All in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265067#M44725</link>
      <description>Hi
&lt;BR /&gt;No, tUnite requires all the inputs should have the same schema. Where will you store the result after merging the two results? File? If so, you can append the records into a exiting file.
&lt;BR /&gt;Best regards
&lt;BR /&gt;Shong</description>
      <pubDate>Wed, 04 May 2011 06:23:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265067#M44725</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-04T06:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Union All in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265068#M44726</link>
      <description>Thanks shong, 
&lt;BR /&gt;I'll be using the output again to a select statement. Here's what I am trying to pertain for visualization. 
&lt;BR /&gt; 
&lt;BR /&gt;SELECT //HERE IS MY MAIN SQL STATEMENT 
&lt;BR /&gt;. 
&lt;BR /&gt;. 
&lt;BR /&gt;. 
&lt;BR /&gt;FROM 
&lt;BR /&gt;( 
&lt;BR /&gt; SELECT // This is my first table 
&lt;BR /&gt; . // my first tInputDB 
&lt;BR /&gt; . 
&lt;BR /&gt; . 
&lt;BR /&gt; FROM 
&lt;BR /&gt; ...... 
&lt;BR /&gt; 
&lt;BR /&gt; UNION ALL // Here what will I use here? tMap or tUnite??? 
&lt;BR /&gt; 
&lt;BR /&gt; SELECT //This is my second table 
&lt;BR /&gt; . // my second InputDB 
&lt;BR /&gt; . 
&lt;BR /&gt; . 
&lt;BR /&gt; FROM 
&lt;BR /&gt; ............ 
&lt;BR /&gt;) tbl 
&lt;BR /&gt;FROM 
&lt;BR /&gt;... 
&lt;BR /&gt;LEFT JOIN 
&lt;BR /&gt;....... 
&lt;BR /&gt;WHERE 
&lt;BR /&gt;....... 
&lt;BR /&gt;ORDER BY 
&lt;BR /&gt;...... 
&lt;BR /&gt; 
&lt;BR /&gt;They have different schema so in that case tUnite is not an option ,I hope you get the hit, Help me out. 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;-D</description>
      <pubDate>Wed, 04 May 2011 07:58:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265068#M44726</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-04T07:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Union All in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265069#M44727</link>
      <description>Hi
&lt;BR /&gt;UNION/UNION ALL requires the two select statement should have the same columns and data type!
&lt;BR /&gt;tUnite can fit your need, yo can filter columns so that they have same columns before tUnite, merge the records from the two tables and insert them into a target table. Finally, execute the main select statement. The job looks like:
&lt;BR /&gt;tMysqlInput_1--main--tFilterColmn---tUnite---tMysqlOutput_1(merge all the records and insert into table tbl)
&lt;BR /&gt; |
&lt;BR /&gt; tFilterColumn
&lt;BR /&gt; |
&lt;BR /&gt; tMysqlInput_2
&lt;BR /&gt; |
&lt;BR /&gt;onsubjobok
&lt;BR /&gt; |
&lt;BR /&gt;tMysqlInput_3
&lt;BR /&gt;On tMysqlInput_3:
&lt;BR /&gt;"
&lt;BR /&gt;SELECT //HERE IS MY MAIN SQL STATEMENT
&lt;BR /&gt;.
&lt;BR /&gt;.
&lt;BR /&gt;.
&lt;BR /&gt;FROM 
&lt;BR /&gt; tbl
&lt;BR /&gt;......
&lt;BR /&gt;LEFT JOIN
&lt;BR /&gt;.......
&lt;BR /&gt;WHERE
&lt;BR /&gt;.......
&lt;BR /&gt;ORDER BY
&lt;BR /&gt;......"
&lt;BR /&gt;Best regards
&lt;BR /&gt;Shong</description>
      <pubDate>Wed, 04 May 2011 08:13:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265069#M44727</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-04T08:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Union All in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265070#M44728</link>
      <description>Thanks Shong, Sorry I understand what you're trying to say. It's just I have a different situation well actually the statement for union goes like this that keeps me 
&lt;BR /&gt;knowing if it's possible with different schema. 
&lt;BR /&gt;################################################################# 
&lt;BR /&gt; -- -------------------- 
&lt;BR /&gt; -- CASH/CREDIT CUSTOMER 
&lt;BR /&gt; -- -------------------- 
&lt;BR /&gt; SELECT 
&lt;BR /&gt; GROUP_CONCAT(st.transaction_id SEPARATOR ',') AS transaction_id, 
&lt;BR /&gt; st.shift_report_id, 
&lt;BR /&gt; case 
&lt;BR /&gt; when st.payment_mode='CASH' then 'CASH CUSTOMER' 
&lt;BR /&gt; when st.payment_mode='CREDIT' then 'CREDIT CARD CUSTOMER' 
&lt;BR /&gt; end AS customer_name, 
&lt;BR /&gt; 'NOT APPLICABLE' AS customer_ref, 
&lt;BR /&gt; NULL AS ref_number, 
&lt;BR /&gt; NULL AS ref_plate_number, 
&lt;BR /&gt; st.transaction_type, 
&lt;BR /&gt; st.payment_mode, 
&lt;BR /&gt; st.pump_code, 
&lt;BR /&gt; st.item_code, 
&lt;BR /&gt; st.product_name, 
&lt;BR /&gt; st.unit_price, 
&lt;BR /&gt; sum(st.quantity) AS quantity, 
&lt;BR /&gt; sum( 
&lt;BR /&gt; case 
&lt;BR /&gt; when st.lb_discount&amp;gt;0 
&lt;BR /&gt; then ( st.lb_discount * st.quantity * -1 ) 
&lt;BR /&gt; end 
&lt;BR /&gt; ) AS lb_discount, 
&lt;BR /&gt; NULL AS other_discount_type, 
&lt;BR /&gt; NULL AS other_discount, 
&lt;BR /&gt; NULL AS ar_from_spi 
&lt;BR /&gt; FROM 
&lt;BR /&gt; st_transactions st 
&lt;BR /&gt; UNION ALL 
&lt;BR /&gt; -- ------------------ 
&lt;BR /&gt; -- NONE CASH CUSTOMER 
&lt;BR /&gt; -- ------------------ 
&lt;BR /&gt; SELECT 
&lt;BR /&gt; st.transaction_id, 
&lt;BR /&gt; st.shift_report_id, 
&lt;BR /&gt; case 
&lt;BR /&gt; when st.transaction_type='GIFT CARD' 
&lt;BR /&gt; OR st.transaction_type='FLEET CARD' 
&lt;BR /&gt; OR st.transaction_type='VIP REDEMPTION' 
&lt;BR /&gt; OR st.transaction_type='EMPLOYEE GAS UP' 
&lt;BR /&gt; OR st.transaction_type='HAULER GAS UP' 
&lt;BR /&gt; OR st.transaction_type='MISFILL' 
&lt;BR /&gt; OR st.transaction_type='OVERFILL' 
&lt;BR /&gt; then 'CASH CUSTOMER' 
&lt;BR /&gt; when ( st.transaction_type='KEY ACCOUNT' 
&lt;BR /&gt; OR st.transaction_type='SALE' ) 
&lt;BR /&gt; AND st.payment_mode='CASH' 
&lt;BR /&gt; then CONCAT(ucase(st.ref_name_1),'-CASH') 
&lt;BR /&gt; when ( st.transaction_type='KEY ACCOUNT' 
&lt;BR /&gt; OR st.transaction_type='SALE' ) 
&lt;BR /&gt; AND st.payment_mode='CREDIT CARD' 
&lt;BR /&gt; then CONCAT(ucase(st.ref_name_1),'-CREDIT CARD') 
&lt;BR /&gt; else ucase(st.ref_name_1) 
&lt;BR /&gt; end AS customer_name, 
&lt;BR /&gt; . 
&lt;BR /&gt; . 
&lt;BR /&gt; . 
&lt;BR /&gt; st.payment_mode, 
&lt;BR /&gt; st.pump_code, 
&lt;BR /&gt; st.item_code, 
&lt;BR /&gt; st.product_name, 
&lt;BR /&gt; st.unit_price, 
&lt;BR /&gt; st.quantity, 
&lt;BR /&gt; case 
&lt;BR /&gt; when st.lb_discount&amp;gt;0 
&lt;BR /&gt; then ( st.lb_discount * st.quantity * -1 ) 
&lt;BR /&gt; end AS lb_discount, 
&lt;BR /&gt; case 
&lt;BR /&gt; when st.other_discount&amp;gt;0 
&lt;BR /&gt; AND st.transaction_type='KEY ACCOUNT' 
&lt;BR /&gt; AND st.payment_mode!='CASH' 
&lt;BR /&gt; then 'KEY ACCOUNT DISCOUNT' 
&lt;BR /&gt; when st.other_discount&amp;gt;0 
&lt;BR /&gt; AND st.payment_mode='CASH' 
&lt;BR /&gt; AND ( 
&lt;BR /&gt; LEFT(st.item_code,3)='FUE' 
&lt;BR /&gt; OR LEFT(st.item_code,3)='LPG' 
&lt;BR /&gt; ) 
&lt;BR /&gt; then 'FUELS DISCOUNT' 
&lt;BR /&gt; when st.other_discount&amp;gt;0 
&lt;BR /&gt; AND st.payment_mode='CASH' 
&lt;BR /&gt; AND LEFT(st.item_code,3)='LUB' 
&lt;BR /&gt; then 'LUBES DISCOUNT' 
&lt;BR /&gt; end AS other_discount_type, 
&lt;BR /&gt; case 
&lt;BR /&gt; when st.other_discount&amp;gt;0 
&lt;BR /&gt; then ( st.other_discount * st.quantity * -1 ) 
&lt;BR /&gt; end AS other_discount, 
&lt;BR /&gt; case 
&lt;BR /&gt; when st.transaction_type='GIFT CARD' 
&lt;BR /&gt; OR st.transaction_type='FLEET CARD' 
&lt;BR /&gt; OR st.transaction_type='VIP REDEMPTION' 
&lt;BR /&gt; OR st.transaction_type='EMPLOYEE GAS UP' 
&lt;BR /&gt; OR st.transaction_type='HAULER GAS UP' 
&lt;BR /&gt; OR st.transaction_type='MISFILL' 
&lt;BR /&gt; OR st.transaction_type='OVERFILL' 
&lt;BR /&gt; OR st.transaction_type='SPONSORSHIP' 
&lt;BR /&gt; then ( ( st.unit_price - st.lb_discount - st.other_discount ) * st.quantity * -1 ) 
&lt;BR /&gt; end AS ar_from_spi 
&lt;BR /&gt; FROM 
&lt;BR /&gt; st_transactions st 
&lt;BR /&gt;####################################################################### 
&lt;BR /&gt;Anyways Again, 
&lt;BR /&gt;thank you very much shong, In some way your layout is like in my draft plan. 
&lt;BR /&gt;And oh btw, I'm trying the job and it seems in tUnite needs to have same schema for the 2 input it still works and has an output. Any ideas what may happen if I ignore this?</description>
      <pubDate>Wed, 04 May 2011 08:42:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265070#M44728</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-04T08:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Union All in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265071#M44729</link>
      <description>Hi
&lt;BR /&gt;Yes, tUnite need the to have the same schema for the 2 input, the output will depends on the schema of tUnite if you ignore this, the output will union all the records from the 2 input, but some of columns will empty if input don't have these columns. For example:
&lt;BR /&gt;input1:
&lt;BR /&gt;id;name
&lt;BR /&gt;1;shong
&lt;BR /&gt;2;elise
&lt;BR /&gt;3;mike
&lt;BR /&gt;input2:
&lt;BR /&gt;id
&lt;BR /&gt;4
&lt;BR /&gt;5
&lt;BR /&gt;6
&lt;BR /&gt;the schema of tUnite has two column: id, name
&lt;BR /&gt;output:
&lt;BR /&gt;id;name
&lt;BR /&gt;1;shong
&lt;BR /&gt;2;elise
&lt;BR /&gt;3;mike
&lt;BR /&gt;4;
&lt;BR /&gt;5;
&lt;BR /&gt;6;
&lt;BR /&gt;Please note that the data type of column should be same, othewise, it has compilation error.
&lt;BR /&gt;Best regards
&lt;BR /&gt;Shong</description>
      <pubDate>Thu, 05 May 2011 03:25:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265071#M44729</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-05T03:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Union All in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265072#M44730</link>
      <description>Shong, What if in the process the data type is changed for example in my case the transaction_id was an integer and after executing the statement.
&lt;BR /&gt;It changed to an object data type.
&lt;BR /&gt;Having a hard time @_@ getting the right job for my statement.</description>
      <pubDate>Thu, 05 May 2011 03:56:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265072#M44730</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-05T03:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Union All in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265073#M44731</link>
      <description>&lt;P&gt;Shong - how can I do a union all on 2 inputs using the tELTMap component?&amp;nbsp; I'm trying to use this instead of a tmap to push the processing down to Redshift&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 28 Dec 2018 17:24:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Union-All-in-tMap/m-p/2265073#M44731</guid>
      <dc:creator>bradsheridan</dc:creator>
      <dc:date>2018-12-28T17:24:53Z</dc:date>
    </item>
  </channel>
</rss>

