Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Unable append data into existing hive table with HiveContext

Highlighted

Unable append data into existing hive table with HiveContext

New Contributor

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

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)

Don't have an account?
Coming from Hortonworks? Activate your account here