在HIVE Metastore中查询表和列注释

时间:2018-07-24 21:25:47

标签: hive hiveql hadoop2 hive-metastore

我正在尝试弄清楚如何在HIVE Metastore中查询表和列注释(描述)。如果有一种方法可以将注释添加到HIVE表/列,那么应该不是一种方法来查询/报告HIVE Metastore中的注释吗?

请帮助:)

最好的问候, 迈克尔

1 个答案:

答案 0 :(得分:0)

SET @runtot:=0;
SELECT
   DATE_FORMAT(completed,'%d/%m/%Y') AS niceDate,
   wk,
   (@runtot := @runtot + c) AS rt
FROM
   (SELECT
        completed,
   yearweek(completed)as wk,
   COUNT(*) AS c
FROM  `w10_upgrades`
where status = 'Successful' and type = 'Normal'
and yearweek(completed) is not null
GROUP  BY wk
ORDER  BY wk) x