'Get a metastore table object'

def get_tables(self, db, pattern='*'):

    self.metastore._oprot.trans.open()
    tables = self.metastore.get_tables(db_name=db, pattern=pattern)
    objs = self.metastore.get_table_objects_by_name(db, tables)
    self.metastore._oprot.trans.close()
    return objs
