src/dirbs/importer/operator_data_importer.py
def _check_out_of_region_imsi_ratio(self):
        """Check whether the percentage of rows with an out-of-region IMSI is less than our threshold."""
        with self._conn.cursor() as cursor:
            cursor.execute(sql.SQL("""SELECT COUNT(*)
                                        FROM {0}
                                       WHERE fails_prefix_check(imsi_norm, %s)""")
                           .format(self._staging_tbl_identifier),
                           [self._mcc])
            failing_check = cursor.fetchone()[0]
            ratio = failing_check / self._data_length
            threshold = self._out_of_region_imsi_threshold
            return 'out-of-region IMSI data', ratio <= threshold, ratio, threshold, 'out_of_region_imsi'
Check whether the percentage of rows with an out-of-region IMSI is less than our threshold.
Check whether the percentage of rows with an out-of-region IMSI is less than our threshold.
Check whether the percentage of rows with an out - of - region IMSI is less than our threshold .
def _check_out_of_region_imsi_ratio(self):
        with self._conn.cursor() as cursor:
            cursor.execute(sql.SQL("""SELECT COUNT(*)
                                        FROM {0}
                                       WHERE fails_prefix_check(imsi_norm, %s)""")
                           .format(self._staging_tbl_identifier),
                           [self._mcc])
            failing_check = cursor.fetchone()[0]
            ratio = failing_check / self._data_length
            threshold = self._out_of_region_imsi_threshold
            return 'out-of-region IMSI data', ratio <= threshold, ratio, threshold, 'out_of_region_imsi'
def _check_out_of_region_imsi_ratio ( self ) : with self . _conn . cursor ( ) as cursor : cursor . execute ( sql . SQL ( """SELECT COUNT(*)
                                        FROM {0}
                                       WHERE fails_prefix_check(imsi_norm, %s)""" ) . format ( self . _staging_tbl_identifier ) , [ self . _mcc ] ) failing_check = cursor . fetchone ( ) [ 0 ] ratio = failing_check / self . _data_length threshold = self . _out_of_region_imsi_threshold return 'out-of-region IMSI data' , ratio <= threshold , ratio , threshold , 'out_of_region_imsi'
Check whether the percentage of rows with an out-of-region IMSI is less than our threshold.
Check whether the percentage of rows with an out - of - region IMSI is less than our threshold .
"""Check whether the percentage of rows with an out-of-region IMSI is less than our threshold."""
self