Browse Source

HUE-8798 [metastore] Implement listing detailed tables of a database

Romain 6 years ago
parent
commit
cee9a1fdcd
1 changed files with 7 additions and 0 deletions
  1. 7 0
      apps/beeswax/src/beeswax/server/hive_metastore_server.py

+ 7 - 0
apps/beeswax/src/beeswax/server/hive_metastore_server.py

@@ -114,6 +114,13 @@ class HiveMetastoreClient:
     return self.meta_client.get_tables(*args, **kwargs)
 
 
+  def get_tables_meta(self, *args, **kwargs):
+    meta_tables = self.meta_client.get_table_meta(*args, **kwargs)
+    return [
+      {'name': table.tableName, 'type': table.tableType, 'comment': table.comments, 'database': table.dbName}
+      for table in meta_tables
+    ]
+
   def get_table(self, *args, **kwargs):
     table = self.meta_client.get_table(*args, **kwargs)
     return HiveTable(table)