src/dirbs/importer/operator_data_importer.py
def _check_unclean_imsi_ratio(self):
        """Check whether the percentage of IMSIs 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_imsi(imsi_norm)""")
                           .format(self._staging_tbl_identifier))
            failing_check = cursor.fetchone()[0]
            ratio = failing_check / self._data_length
            threshold = self._unclean_imsi_threshold
            return 'unclean IMSI data', ratio <= threshold, ratio, threshold, 'unclean_imsi'
Check whether the percentage of IMSIs with invalid values is less than our configured threshold.
Check whether the percentage of IMSIs with invalid values is less than our configured threshold.
Check whether the percentage of IMSIs with invalid values is less than our configured threshold .
def _check_unclean_imsi_ratio(self):
        with self._conn.cursor() as cursor:
            cursor.execute(sql.SQL("""SELECT COUNT(*)
                                        FROM {0}
                                       WHERE is_unclean_imsi(imsi_norm)""")
                           .format(self._staging_tbl_identifier))
            failing_check = cursor.fetchone()[0]
            ratio = failing_check / self._data_length
            threshold = self._unclean_imsi_threshold
            return 'unclean IMSI data', ratio <= threshold, ratio, threshold, 'unclean_imsi'
def _check_unclean_imsi_ratio ( self ) : with self . _conn . cursor ( ) as cursor : cursor . execute ( sql . SQL ( """SELECT COUNT(*)
                                        FROM {0}
                                       WHERE is_unclean_imsi(imsi_norm)""" ) . format ( self . _staging_tbl_identifier ) ) failing_check = cursor . fetchone ( ) [ 0 ] ratio = failing_check / self . _data_length threshold = self . _unclean_imsi_threshold return 'unclean IMSI data' , ratio <= threshold , ratio , threshold , 'unclean_imsi'
Check whether the percentage of IMSIs with invalid values is less than our configured threshold.
Check whether the percentage of IMSIs with invalid values is less than our configured threshold .
"""Check whether the percentage of IMSIs with invalid values is less than our configured threshold."""
self