diff --git a/airflow/hooks/hive_hooks.py b/airflow/hooks/hive_hooks.py index 2795efac91..c302aac799 100644 --- a/airflow/hooks/hive_hooks.py +++ b/airflow/hooks/hive_hooks.py @@ -212,6 +212,15 @@ class HiveMetastoreHook(BaseHook): self.metastore._oprot.trans.close() return objs + def get_databases(self, pattern='*'): + ''' + Get a metastore table object + ''' + self.metastore._oprot.trans.open() + dbs = self.metastore.get_databases(pattern) + self.metastore._oprot.trans.close() + return dbs + def get_partitions( self, schema, table_name, filter=None): '''