src/dirbs/importer/abstract_importer.py
def _validate_threshold_checks(self):
        """Method to validate staging data prior to import. By default does nothing."""
        self._logger.info('Running threshold checks on staging table data...')
        for check, result, ratio, threshold, metric_key in self._threshold_validation_checks:
            if not result:
                msg = 'Failed {check} threshold check, limit is: {threshold:.2f} and imported data has: {ratio:.2f}'
                raise exceptions.ValidationCheckException(msg.format(check=check, ratio=ratio, threshold=threshold),
                                                          metric_key=metric_key,
                                                          statsd=self._statsd,
                                                          metrics_failures_root=self._metrics_failures_root)
            else:
                msg = 'Passed {check} threshold check, limit is: {threshold:.2f} and imported data has: {ratio:.2f}'
                self._logger.info(msg.format(check=check, ratio=ratio, threshold=threshold))
        self._logger.info('Finished running threshold validation checks on staging table data')
Method to validate staging data prior to import. By default does nothing.
Method to validate staging data prior to import. By default does nothing.
Method to validate staging data prior to import . By default does nothing .
def _validate_threshold_checks(self):
        self._logger.info('Running threshold checks on staging table data...')
        for check, result, ratio, threshold, metric_key in self._threshold_validation_checks:
            if not result:
                msg = 'Failed {check} threshold check, limit is: {threshold:.2f} and imported data has: {ratio:.2f}'
                raise exceptions.ValidationCheckException(msg.format(check=check, ratio=ratio, threshold=threshold),
                                                          metric_key=metric_key,
                                                          statsd=self._statsd,
                                                          metrics_failures_root=self._metrics_failures_root)
            else:
                msg = 'Passed {check} threshold check, limit is: {threshold:.2f} and imported data has: {ratio:.2f}'
                self._logger.info(msg.format(check=check, ratio=ratio, threshold=threshold))
        self._logger.info('Finished running threshold validation checks on staging table data')
def _validate_threshold_checks ( self ) : self . _logger . info ( 'Running threshold checks on staging table data...' ) for check , result , ratio , threshold , metric_key in self . _threshold_validation_checks : if not result : msg = 'Failed {check} threshold check, limit is: {threshold:.2f} and imported data has: {ratio:.2f}' raise exceptions . ValidationCheckException ( msg . format ( check = check , ratio = ratio , threshold = threshold ) , metric_key = metric_key , statsd = self . _statsd , metrics_failures_root = self . _metrics_failures_root ) else : msg = 'Passed {check} threshold check, limit is: {threshold:.2f} and imported data has: {ratio:.2f}' self . _logger . info ( msg . format ( check = check , ratio = ratio , threshold = threshold ) ) self . _logger . info ( 'Finished running threshold validation checks on staging table data' )
Method to validate staging data prior to import.
Method to validate staging data prior to import .
"""Method to validate staging data prior to import. By default does nothing."""
self