src/dirbs/importer/operator_data_importer.py
def _check_unclean_imei_ratio(self):
        """Check whether the percentage of IMEIs with invalid values is less than our configured threshold."""
        with self._conn.cursor() as cursor:
            cursor.execute(sql.SQL("""SELECT COUNT(*)
                                        FROM {0}
                                       WHERE is_unclean_imei(imei_norm, imei)""")
                           .format(self._staging_tbl_identifier))
            failing_check = cursor.fetchone()[0]
            ratio = failing_check / self._data_length
            threshold = self._unclean_imei_threshold
            return 'unclean IMEI data', ratio <= threshold, ratio, threshold, 'unclean_imei'
Check whether the percentage of IMEIs with invalid values is less than our configured threshold.
Check whether the percentage of IMEIs with invalid values is less than our configured threshold.
Check whether the percentage of IMEIs with invalid values is less than our configured threshold .
def _check_unclean_imei_ratio(self):
        with self._conn.cursor() as cursor:
            cursor.execute(sql.SQL("""SELECT COUNT(*)
                                        FROM {0}
                                       WHERE is_unclean_imei(imei_norm, imei)""")
                           .format(self._staging_tbl_identifier))
            failing_check = cursor.fetchone()[0]
            ratio = failing_check / self._data_length
            threshold = self._unclean_imei_threshold
            return 'unclean IMEI data', ratio <= threshold, ratio, threshold, 'unclean_imei'
def _check_unclean_imei_ratio ( self ) : with self . _conn . cursor ( ) as cursor : cursor . execute ( sql . SQL ( """SELECT COUNT(*)
                                        FROM {0}
                                       WHERE is_unclean_imei(imei_norm, imei)""" ) . format ( self . _staging_tbl_identifier ) ) failing_check = cursor . fetchone ( ) [ 0 ] ratio = failing_check / self . _data_length threshold = self . _unclean_imei_threshold return 'unclean IMEI data' , ratio <= threshold , ratio , threshold , 'unclean_imei'
Check whether the percentage of IMEIs with invalid values is less than our configured threshold.
Check whether the percentage of IMEIs with invalid values is less than our configured threshold .
"""Check whether the percentage of IMEIs with invalid values is less than our configured threshold."""
self