You are on page 1of 5

hive exercises

database creation:

Create external table :

Describe Table :
this command returns quickly (probably seconds). why?

if we are not doing any filtering (like where), and returning all rows, no MR is
done
Create internal table :

LOAD DATA :

validate that the data made it into hive


in another terminal, let's look for where the data lives

where does our "external" (page_view_external) tables data live? this should
work, right?

WRONG! This data is EXTERNAL and in the location that we connected up with
the CREATE TABLE command

notice tableType (MANAGED_TABLE)

you may want to query the hive data more, but when you're done, let's drop
each table & notice what happens
in a 2nd terminal, run these commands. Which data do we expect to persist?

You might also like