Does hive have a data dictionary?

非 Y 不嫁゛ 提交于 2020-06-17 02:01:34

问题


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:

  1. Local: In local configuration meta-store is stored in a relational database. But it runs in same JVM's.
  2. Remote: In this configuration meta-store is stored in a relational database but database is located remote. And runs in a separate JVM.
  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!