Database Reference
In-Depth Information
2. Next, enter the following:
cd hive-0.11.0.1.3.0.0-0380\bin
Alternatively, type hive and then press Tab; it will fill in the rest of the
folder name for you and then add \bin ).
3. Then enter the following:
hive
This brings up the Hive prompt, and the fact that it comes up is the first
thing that lets us know that the service is running as expected.
To find out what objects already exist in your Hive database, enter the
following command:
show tables;
There may be a few tables listed from the previous smoke tests that were
run.
NOTE
Make sure to include the semicolon after each command; otherwise, the
Hive prompt will simply go to the next line and await further
commands.
To create your own table based on the airline data that you loaded earlier,
run the following command. Note that you may need to replace
“administrator” inthelocationpathwithyourusernamethatyouusedtolog
into Windows:
CREATE EXTERNAL TABLE flightinfo (
Year int,
Month int,
DayofMonth int,
DayOfWeek int,
DepTime int,
CRSDepTime int,
Search WWH ::




Custom Search