Support Questions
Find answers, ask questions, and share your expertise

Unable append data into existing hive table with HiveContext

Unable append data into existing hive table with HiveContext

We are reading data from hive a table with hiveContext using spark dataframe, After doing some aggregations on data we have store this data into another table(which is having data already). But somehow data was not appending into existing table... and not showing any error also...

Note: Before storing into hive i am able to print the dataframe

1 REPLY 1
Highlighted

Re: Unable append data into existing hive table with HiveContext

New Contributor

Hello, you should probably specify the write mode

yourDF.write.format("orc").partitionBy(partitionColumnName).mode("overwrite").insertInto(tableName)

yourDF.write.mode("append").saveAsTable(tableName)