hitrix
hitrix

Reputation: 133

how to write queries in Hive Web Interface

I was playing around with hwi, I got it started.Now I can see the different schemas which are present. But I don't know how to query them. I tried to check hive wiki (https://cwiki.apache.org/confluence/display/Hive/HiveWebInterface) but they dont seem to have much information put over there. There seems to be a Running a query section in Walk through but it says image not found.

Anybody who has used HWI to query please suggest a way to use it.

Upvotes: 1

Views: 3751

Answers (2)

Tariq
Tariq

Reputation: 34184

Try these steps :

  1. Open HWI : http://localhost:9999/hwi/index.jsp
  2. Click on Authorize in the left pane. This will open the Change User Info section. Enter the username and hit submit to complete the authorization process. Upon successful authorization you'll see Authorization is complete at the top of your page.
  3. Now click on Create Session, enter some session name and hit Submit.
  4. Once you submit the session name you'll get the Manage Session screen. This is the place where all the action will take place. Come down to the Session Details section and enter a file name, say /Users/tariq/res.txt, in the Result File box. This is the file where the result of your query will get stored. If you expect your result to be very huge you can just enter /dev/null over there. Remember the result file is local to the web server. Similarly enter the error file if you wish.
  5. Now come down to the Query box and write the query you want to execute.
  6. Come down further to the Start Query drop down list, click on it and elect YES and hit Submit.

You should be able to see the file /Users/tariq/res.txt by now containing the result of your query. You can also view the result by clicking on View File option which will appear next to the Result File box upon the successful completion of your query.

HTH

Upvotes: 5

Soucrit
Soucrit

Reputation: 323

Take a look at Hue - http://cloudera.github.io/hue/

This project is bundled with the Cloudera installation and seems to work rather well.

Best, Sukrit

Upvotes: 0

Related Questions