beeline

Connecting to Hive using Beeline

拈花ヽ惹草 提交于 2019-11-29 03:01:58
问题 I am trying to connect to hive installed in my machine through Beeline client. when I give the 'beeline' command & connect to Hive, the client is asking for user name & password !connect jdbc:hive2://localhost:10000/default I have no idea what is the user name and password I am supposed to give. Do I have to add the credential(user name & password) in some configuration file? 回答1: no username and no password. !connect jdbc:hive2://localhost:10000/default Enter username for jdbc:hive2:/

Export as csv in beeline hive

做~自己de王妃 提交于 2019-11-27 08:55:00
I am trying to export my hive table as a csv in beeline hive. When I run the command !sql select * from database1 > /user/bob/output.csv it gives me syntax error. I have successfully connected to the database at this point using the below command. The query outputs the correct results on console. beeline -u 'jdbc:hive2://[databaseaddress]' --outputformat=csv Also, not very clear where the file ends up. It should be the file path in hdfs correct? ozw1z5rd When hive version is at least 0.11.0 you can execute: INSERT OVERWRITE LOCAL DIRECTORY '/tmp/directoryWhereToStoreData' ROW FORMAT DELIMITED

Export as csv in beeline hive

狂风中的少年 提交于 2019-11-26 17:45:31
问题 I am trying to export my hive table as a csv in beeline hive. When I run the command !sql select * from database1 > /user/bob/output.csv it gives me syntax error. I have successfully connected to the database at this point using the below command. The query outputs the correct results on console. beeline -u 'jdbc:hive2://[databaseaddress]' --outputformat=csv Also, not very clear where the file ends up. It should be the file path in hdfs correct? 回答1: When hive version is at least 0.11.0 you