<?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 how to write from one Hive table to another table with row counts? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/how-to-write-from-one-Hive-table-to-another-table-with-row/m-p/2273910#M50742</link>
    <description>&lt;P&gt;I have a partitioned table in one database Share_In. This table is partitioned on date. There is one file which stores different dates and the data of these dates may or may not exist in the share_in database table. I want to copy the data as it is from this shared_in db to another table in shared_out db based on the dates in the file. I have used tHiveRow to write into shared_out db but i am facing 2 issues:&lt;/P&gt;
&lt;P&gt;1. Even if the date mentioned in the file does not have corresponding partition in the Shared_In db, the partition gets created in Shared_out db.&lt;/P&gt;
&lt;P&gt;2. How do i count the number of rows for each partition in tHiveRow component.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the query i wrote in tHiveRow:&lt;/P&gt;
&lt;P&gt;"insert into "+ context.HIVE_OUT_Database + ".xva_crva_data_out partition&lt;BR /&gt;(effectivedate = "+(Integer)globalMap.get("row1.rundate")+")&lt;BR /&gt;select legalentity, cif, cva, dva, fca, currencycode, effectivedate from xva_crva_data where effectivedate ="+ ((Integer)globalMap.get("row1.rundate"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 05:03:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T05:03:22Z</dc:date>
    <item>
      <title>how to write from one Hive table to another table with row counts?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-write-from-one-Hive-table-to-another-table-with-row/m-p/2273910#M50742</link>
      <description>&lt;P&gt;I have a partitioned table in one database Share_In. This table is partitioned on date. There is one file which stores different dates and the data of these dates may or may not exist in the share_in database table. I want to copy the data as it is from this shared_in db to another table in shared_out db based on the dates in the file. I have used tHiveRow to write into shared_out db but i am facing 2 issues:&lt;/P&gt;
&lt;P&gt;1. Even if the date mentioned in the file does not have corresponding partition in the Shared_In db, the partition gets created in Shared_out db.&lt;/P&gt;
&lt;P&gt;2. How do i count the number of rows for each partition in tHiveRow component.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the query i wrote in tHiveRow:&lt;/P&gt;
&lt;P&gt;"insert into "+ context.HIVE_OUT_Database + ".xva_crva_data_out partition&lt;BR /&gt;(effectivedate = "+(Integer)globalMap.get("row1.rundate")+")&lt;BR /&gt;select legalentity, cif, cva, dva, fca, currencycode, effectivedate from xva_crva_data where effectivedate ="+ ((Integer)globalMap.get("row1.rundate"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:03:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-write-from-one-Hive-table-to-another-table-with-row/m-p/2273910#M50742</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T05:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to write from one Hive table to another table with row counts?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-write-from-one-Hive-table-to-another-table-with-row/m-p/2273911#M50743</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;You can take a try to use use tHiveInput instead of tHiveRow component and pass "Select count(*) from"+context.TableName.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Best regards&lt;/P&gt; 
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2019 11:03:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-write-from-one-Hive-table-to-another-table-with-row/m-p/2273911#M50743</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-30T11:03:06Z</dc:date>
    </item>
  </channel>
</rss>

