airflow/hooks/hive_hooks.py
def table_exists(self, table_name, db='default'):
        """
        Check if table exists

        >>> hh = HiveMetastoreHook()
        >>> hh.table_exists(db='airflow', table_name='static_babynames')
        True
        >>> hh.table_exists(db='airflow', table_name='does_not_exist')
        False
        """
        try:
            self.get_table(table_name, db)
            return True
        except Exception:
            return False
def table_exists(self, table_name, db='default'):
        try:
            self.get_table(table_name, db)
            return True
        except Exception:
            return False
def table_exists ( self , table_name , db = 'default' ) : try : self . get_table ( table_name , db ) return True except Exception : return False
Check if table exists

        >>> hh = HiveMetastoreHook()
        >>> hh.table_exists(db='airflow', table_name='static_babynames')
        True
        >>> hh.table_exists(db='airflow', table_name='does_not_exist')
        False
Check if table exists