Support Questions

Find answers, ask questions, and share your expertise

Phoenix - Create Table Question

avatar
Contributor

I'm connecting to Phoenix Query Server via the following:

/usr/hdp/current/phoenix-client/bin/sqlline.py hbasemaster:2181:/hbase-unsecure

I'm able successfully connect. I then create a table using:

create table mytable (id varchar not null primary key, mycolumn varchar);

That command seems to run successfully. However, when I try to verify the table exists via:

!tables

I don't see my table listed. When I try to use sql as a verification via:

select * from mytable;

I get a "TableNotFoundException". If I try to create the table again, I get an error that the table already exists. If I look a the HBase Master UI, I can see the table exists in HBase. I'm confused. What am I missing here?

I'm running HDP 2.3.2

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Michael Young

Are you using Phoenix query server? Try accessing table using sqlline.py if you are using pqs

I had same issue with PQS

View solution in original post

16 REPLIES 16

avatar
Guru

@Michael Young try $PHONEIX_HOME/bin/sqlline.py <hostname>:2181:/<hbase-unsecure>

avatar
Contributor

That is how I'm connecting. I have updated my original question to show that. I can connect fine.

avatar
Master Mentor

avatar
Contributor

While I appreciate your sharing the link, it doesn't cover anything related to my question.

avatar
Master Mentor

That link has example of using sqlline.py ..Let me reproduce this again.

Can you share your connecting string ? @Michael Young

avatar
Contributor

My connect string is show at the top of my original post. I'm able to connect fine.

avatar
Super Guru

Can you try enabling log4j DEBUG by editing /usr/hdp/current/phoenix-client/bin/log4j.properties? Set psql.root.logger=DEBUG,console and log4j.threshold=DEBUG, I believe they would be at INFO or WARN by default.