8

Use phoenix sqlline to connect the hbase. On SecureCRT terminal I can only see three columns of table which has more than 10 columns. I would like to display all columns of the table to test if data is ok. Is there any configuration should be set?

0: jdbc:phoenix:10.35.66.72:2181:/hbase> select * from WL.MSGCENTER_PUSHMESSAGE;
+--------------+---------+---------------------------------------------------------------------------------------------------------------------------------------------+
|    PLANID    | BATCHID |                                                                                                                                                 |
+--------------+---------+---------------------------------------------------------------------------------------------------------------------------------------------+
| 520          | 1       | C285995F-AB23-4CF0-A9A4-F29175E9CD36                                                                                                           |
+--------------+---------+---------------------------------------------------------------------------------------------------------------------------------------------+

1 row selected (0.805 seconds)

Carl H
  • 353
  • 1
  • 4
  • 18

3 Answers3

28

You can change the output format from horizontal to vertical

!outputformat vertical
userxxx
  • 726
  • 9
  • 18
  • 1
    Agreed, this is very useful and should be the accepted answer. It serializes the table, which is often what a JSON API would do. – Hendrik F Oct 24 '16 at 15:17
5

Try setting the terminal width before starting sqlline

stty cols 200
kliew
  • 2,687
  • 1
  • 11
  • 25
1

Sqlline is not smart enough to adjust column width. Make the terminal wider and you might see the data.
Ideally, i would recommend you to use squirrel-sql or db-visualizer to connect to Phoenix. They are much better tool to query Phoenix.

Have a look at this: http://search-hadoop.com/m/9UY0h2sGBoSz1Mta1

Anil Gupta
  • 1,106
  • 2
  • 8
  • 12