<?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>question Re: Inserting df data into exiting  Hive table in a specific column in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Inserting-into-exiting-partitioned-Hive-table-using/m-p/287957#M213349</link>
    <description>&lt;P&gt;Dear Sir, i want to enter python calculated values which are saved in df4 should get stored a column of ''per" per is name of column in hive table .&lt;/P&gt;&lt;PRE&gt;df2 = pd.read_sql(&lt;SPAN&gt;"SELECT * FROM ggg where clientcode='55'"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;conn)&lt;/PRE&gt;&lt;P&gt;this is how i am reading the data how to write df4&amp;nbsp; python calculated values in "per" column of hive table.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jan 2020 12:37:44 GMT</pubDate>
    <dc:creator>Rak</dc:creator>
    <dc:date>2020-01-20T12:37:44Z</dc:date>
    <item>
      <title>Inserting into exiting partitioned Hive table using HiveContext in pyspark</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Inserting-into-exiting-partitioned-Hive-table-using/m-p/187518#M149619</link>
      <description>&lt;P&gt;I Am trying to get data-set from a existing non partitioned hive table and trying an insert into partitioned Hive external table. How do i do that in Pyspark Sql.? Any help would be appreciated,&lt;/P&gt;&lt;P&gt;I am currently using the below command.  The Hive External table has multiple partitions.&lt;/P&gt;&lt;P&gt;df.write.mode("overwrite").partitionBy("col1","col2").insertInto("Hive external Partitioned Table")&lt;/P&gt;&lt;P&gt;The spark job is running successfully but no data is written to the HDFS partitions of the Hive external table.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2018 04:51:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Inserting-into-exiting-partitioned-Hive-table-using/m-p/187518#M149619</guid>
      <dc:creator>vignesh_asokan2</dc:creator>
      <dc:date>2018-01-14T04:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting into exiting partitioned Hive table using HiveContext in pyspark</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Inserting-into-exiting-partitioned-Hive-table-using/m-p/187519#M149620</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/54186/vigneshasokan26.html" nodeid="54186"&gt;@Vignesh Asokan&lt;/A&gt; &lt;/P&gt;&lt;P&gt;1.Do &lt;/P&gt;&lt;PRE&gt;hive# desc formatted &amp;lt;hive-external-partitioned-table&amp;gt;;&lt;/PRE&gt;&lt;P&gt;get the Location details from desc formatted statement and do&lt;/P&gt;&lt;PRE&gt;bash$ hdfs dfs -ls &amp;lt;hdfs-location&amp;gt;&lt;/PRE&gt;&lt;P&gt;Check is there any partitions created (or) not.&lt;/P&gt;&lt;P&gt;2.In pyspark shell after executing below statement &lt;/P&gt;&lt;PRE&gt;df.write.mode("overwrite").partitionBy("col1","col2").insertInto("Hive external Partitioned Table")&lt;/PRE&gt;&lt;P&gt;in &lt;STRONG&gt;pyspark shell logs shows where the partition directory is creating in HDFS location &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:-&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;18/01/13 17:47:52 INFO FileUtils: Creating directory if it doesn't exist: hdfs://******/apps/hive/warehouse/partition_table/daily=2017-12-23&lt;/PRE&gt;
&lt;STRONG&gt;&lt;/STRONG&gt;As you can see above in pyspark shell logs it has shown creating directory in &lt;STRONG&gt;/apps/hive/warehouse/partition_table/daily=2017-12-23,&lt;/STRONG&gt;
&lt;P&gt;my table name is partition_table and having daily is the partition column spark has created &lt;STRONG&gt;partition&lt;/STRONG&gt; in HDFS  &lt;STRONG&gt;/apps/hive/warehouse/partition_table/&lt;/STRONG&gt; directory.&lt;/P&gt;&lt;P&gt;if you are not able to figure out the issue share more details (pyspark shell logs, table location details and statements that you are executing in pyspark shell).&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2018 07:02:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Inserting-into-exiting-partitioned-Hive-table-using/m-p/187519#M149620</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2018-01-14T07:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting into exiting partitioned Hive table using HiveContext in pyspark</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Inserting-into-exiting-partitioned-Hive-table-using/m-p/187520#M149621</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Thanks for the answer, it works.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Vignesh Asokan&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2018 17:30:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Inserting-into-exiting-partitioned-Hive-table-using/m-p/187520#M149621</guid>
      <dc:creator>vignesh_asokan2</dc:creator>
      <dc:date>2018-01-14T17:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting df data into exiting  Hive table in a specific column</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Inserting-into-exiting-partitioned-Hive-table-using/m-p/287957#M213349</link>
      <description>&lt;P&gt;Dear Sir, i want to enter python calculated values which are saved in df4 should get stored a column of ''per" per is name of column in hive table .&lt;/P&gt;&lt;PRE&gt;df2 = pd.read_sql(&lt;SPAN&gt;"SELECT * FROM ggg where clientcode='55'"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;conn)&lt;/PRE&gt;&lt;P&gt;this is how i am reading the data how to write df4&amp;nbsp; python calculated values in "per" column of hive table.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 12:37:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Inserting-into-exiting-partitioned-Hive-table-using/m-p/287957#M213349</guid>
      <dc:creator>Rak</dc:creator>
      <dc:date>2020-01-20T12:37:44Z</dc:date>
    </item>
  </channel>
</rss>

