更新时间:2022-10-31 15:49:27
beeline --incremental=true
注意:命令行选项-incremental=true"是可选的,但会延长您可以保持空闲状态并且不会断开连接的时间.
Note: The command line option "—incremental=true" is optional, but will extend the amount of time that you can remain idle and not have your connection dropped.
!connect jdbc:hive2://silver-server-
hive.app.google.com:10000/default
注意:系统将提示您输入用户名 &密码.使用用户名和密码
Note: You will be prompted for your username & password. USE user name and Password
beeline> !connect jdbc:hive2:// silver-server-hive.app.google.com:10000/default
scan complete in 3ms
Connecting to jdbc:hive2:// silver-server-hive.app.google.com:10000/default
Enter username for jdbc:hive2:// silver-server-hive.app.google.com:10000/default:suman
Enter password for jdbc:hive2:// silver-server-hive.app.google.com:10000/default: *********
set mapred.job.queue.name=<your queue name>;
注意:您需要设置一个队列才能运行查询.
Note: You need to set a queue in order to run queries.
USE google_map_data;
注意:执行查询时,您应该在数据库中.
Note: You should be in a database when executing queries.
!reconnect jdbc:hive2:// silver-server-hive.app.google.com:10000/default;
!quit
注意事项:
beeline -u jdbc:hive2:// silver-server-hive.app.google.com:10000
-n <yourname> -p <yourpassword> --incremental=true**
Beeline 支持丰富的 SQL 查询功能.
Beeline supports a rich set of SQL query functions.
SHOW DATABASES;
USE <database>;
SHOW TABLES;
DESC <table>;
DESC FORMATTED <table>;
SELECT * FROM google_map_city limit 25;