src/dirbs/importer/operator_data_importer.py
def _check_null_ratio(self):
        """Combined NULL check.

        Check whether the percentage of records with any NULL column value is less than
        our configured threshold.
        """
        with self._conn.cursor() as cursor:
            cols_to_check = self._null_clean_check_valid_columns
            null_filters = sql.SQL(' OR ').join([sql.SQL('{0} IS NULL').format(sql.Identifier(c))
                                                 for c in cols_to_check])

            cursor.execute(sql.SQL('SELECT COUNT(*) FROM {0} WHERE {1}')
                           .format(self._staging_tbl_identifier, null_filters))
            failing_null_check = cursor.fetchone()[0]
            ratio = failing_null_check / self._data_length
            return 'NULL data (combined)', ratio <= self._null_threshold, ratio, self._null_threshold, 'null'
Combined NULL check.

        Check whether the percentage of records with any NULL column value is less than
        our configured threshold.
        
Combined NULL check.
Check whether the percentage of records with any NULL column value is less than
our configured threshold.
Combined NULL check . Check whether the percentage of records with any NULL column value is less than our configured threshold .
def _check_null_ratio(self):
        with self._conn.cursor() as cursor:
            cols_to_check = self._null_clean_check_valid_columns
            null_filters = sql.SQL(' OR ').join([sql.SQL('{0} IS NULL').format(sql.Identifier(c))
                                                 for c in cols_to_check])
            cursor.execute(sql.SQL('SELECT COUNT(*) FROM {0} WHERE {1}')
                           .format(self._staging_tbl_identifier, null_filters))
            failing_null_check = cursor.fetchone()[0]
            ratio = failing_null_check / self._data_length
            return 'NULL data (combined)', ratio <= self._null_threshold, ratio, self._null_threshold, 'null'
def _check_null_ratio ( self ) : with self . _conn . cursor ( ) as cursor : cols_to_check = self . _null_clean_check_valid_columns null_filters = sql . SQL ( ' OR ' ) . join ( [ sql . SQL ( '{0} IS NULL' ) . format ( sql . Identifier ( c ) ) for c in cols_to_check ] ) cursor . execute ( sql . SQL ( 'SELECT COUNT(*) FROM {0} WHERE {1}' ) . format ( self . _staging_tbl_identifier , null_filters ) ) failing_null_check = cursor . fetchone ( ) [ 0 ] ratio = failing_null_check / self . _data_length return 'NULL data (combined)' , ratio <= self . _null_threshold , ratio , self . _null_threshold , 'null'
Combined NULL check.
Combined NULL check .
"""Combined NULL check.

        Check whether the percentage of records with any NULL column value is less than
        our configured threshold.
        """
self