There are important metadata registered in the tables by
create table t1 (
column1 type COMMENT '... the comments1...',
column2 type COMMENT '... the comments2...'
...
);
in our database hundreds of tables, and hundreds of column's COMMENT
for each table.
We need Spark or HQL statement to obtain SQL column comments.
How to do some serious information retrieval about it? I need it as a first class table,... Or, if it is impossible, a JSON or standard MIME CSV file with all metadata.
NOTES:
We use both, direct Hive SQL and Spark, so any answer (HQL or Scala/Spark script) is valid.
Not need to scrape SHOW/DESCRIBE TABLES command, need serious solution.
This question is similar, but restricted to MySQL... The only clue is to do some direct acess to the Metastore (in our config seems Derby SQL schema - no standard).
This other question also about "serious information retrieval" of metadata.