Support Questions

Find answers, ask questions, and share your expertise

Issue while upsert data into phoenix through hive JDBC

Hi I am using hdp 2.5.6

I am trying to upsert the data into tables through beeline jdbc connection.

Connection sting !connect jdbc:phoenix:ZK:2181:/hbase-unsecure

while trying to upsert data into table. Not able to see new values.

1: jdbc:phoenix:ip-192-168-180-146.ca-central> select * from event; +-------+-----------+-------+--+ | TYPE | EVENT_ID | FLAG | +-------+-----------+-------+--+ +-------+-----------+-------+--+ No rows selected (0.034 seconds)

1: jdbc:phoenix:ip-192-168-180-146.ca-central> upsert into event values ('D',13,'Y'); 1 row affected (0.001 seconds) 1: jdbc:phoenix:ip-192-168-180-146.ca-central> select * from event; +-------+-----------+-------+--+ | TYPE | EVENT_ID | FLAG | +-------+-----------+-------+--+ +-------+-----------+-------+--+

Is there I need to do any configuration for this?

Thanks in Advance...!!!!!

7 REPLIES 7

Are you actually using Beeline? Or do you mean Sqlline?

Super Collaborator

I believe that you are telling about sqlline, not beeline. Actually that looks weird. Such things should work out of the box without any specific configuration. Could you please provide the DDL for the table you are using? Also check the region server logs for any exception/error.

@ Sergey Soldatov

I have done beeline and then

ran query to connect

!connect jdbc:phoenix:ZK:2181:/hbase-unsecure

and then I have created table then tried to upsert into event values ('D',13,'Y');.

Query is executed successfully but field are not updated . Am I doing wrong steps. If yes then please suggest me with right way or any link from where I can go though.

@Sergey Soldatov

I have one more query related to performance. If I created one schema and under that created multiple tables. And asked user's to use upsert, update command on same same table but with there tentative id, there they could be any performance impact or not.

Super Collaborator

Could you reproduce this problem using the regular Phoenix CLI ? If you are using HDP that would be phoenix-sqlline and it should be in the PATH already.

My problem is resolved. As per your suggestion I am able to do upsert for tentaive ID.

Do you have any link from where I can read more about phoenix.

@Sergey Soldatov

Can you provide me link to red more about phoenix and multi tenant functinality.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.