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.

Hive connection error while using mutation api

Highlighted

Hive connection error while using mutation api

New Contributor

Hi,

We are trying to use hive streaming mutation api. we need to update data if its already present in hive tables.

While trying to connect to hive, we are getting below error:

Exception in thread "main" org.apache.hive.hcatalog.streaming.mutate.client.TransactionException: Not connected - cannot create transaction

Our requirement is to do bulk insertion and no duplicate. If there are any better solution / sample code , please do share.

Any help is much appriciated!

1 REPLY 1

Re: Hive connection error while using mutation api

Expert Contributor

Have you considered using Merge statement? For example, https://community.hortonworks.com/articles/97113/hive-acid-merge-by-example.html

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