Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How do I interact with the Metastore?

How do I interact with the Metastore?

New Contributor

I'm preparing for the CCA175 exam, and the requirements include the following:

  • Use metastore tables as an input source or an output sink for Spark applications

Is there any difference between the term "metastore table" and "Hive table"?


I can write from Spark to a Hive table with the HiveContext. But the metastore is something different from "normal" Hive tables, isn't it? 

If so, which Spark commands would allow me to read/write from/to the Metastore?


Is it maybe just the creation/modification/deletion of tables via commands such as sqlContext.sql("CREATE TABLE mytable (var1 INT)") ?


Re: How do I interact with the Metastore?


hive metastore table  - stores the metadata for Hive tables , mostly it will be mysql,oracle database etc 

by default Hive uses derby database as its metastore.


hive table - thinking of it as business table were user creates stores its data in HDFS.


if you know the metastore 's database that it has configured along with user credentials you should be able to see the hive metastore tables by firing "show tables " after getting into the db terminal .