问题
Does hive have a data dictionary? I am trying to fetch the column names of tables in hive. Similar to oracle query other than describe command:
SELECT COLUMN_NAME,DATA_TYPE FROM USER_TAB_COLUMNS
WHERE TABLE_NAME = ? ORDER BY COLUMN_ID;
回答1:
Hive uses an external relational database as its metastore. You can query the configured metastore directly, using the metastore API (eg. MySQL). A higher level component is HCatalog, which offers an API to access and manipulate the metastore.
回答2:
Hive works in three configurations:
- Local: In local configuration meta-store is stored in a relational database. But it runs in same JVM's.
- Remote: In this configuration meta-store is stored in a relational database but database is located remote. And runs in a separate JVM.
- Embedded: In embedded configuration meta store is a derby database. This database comes with Hive. And runs in the same jvm as Hive Services, Hive Client and Meta Store.This is called as embedded configuration.
来源:https://stackoverflow.com/questions/22472258/does-hive-have-a-data-dictionary