src/dirbs/cli/importer.py
def operator(ctx, config, statsd, logger, run_id, conn, metadata_conn, command, metrics_root, metrics_run_root,
             operator_id, input_file, disable_leading_zero_check, disable_null_check, disable_clean_check,
             disable_region_check, disable_home_check, disable_historic_check, disable_auto_analyze):
    """
    Import the CSV operator data found in INPUT into the PostgreSQL database.

    OPERATOR_ID is an ID up to 16 characters to unique identify the operator.
    """
    op_tc = config.operator_threshold_config
    params = _common_import_params(ctx)
    params.update({'operator_id': operator_id,
                   'null_imei_threshold': op_tc.null_imei_threshold,
                   'null_imsi_threshold': op_tc.null_imsi_threshold,
                   'null_msisdn_threshold': op_tc.null_msisdn_threshold,
                   'null_rat_threshold': op_tc.null_rat_threshold,
                   'null_threshold': op_tc.null_threshold,
                   'unclean_imei_threshold': op_tc.unclean_imei_threshold,
                   'unclean_imsi_threshold': op_tc.unclean_imsi_threshold,
                   'unclean_threshold': op_tc.unclean_threshold,
                   'out_of_region_imsi_threshold': op_tc.out_of_region_imsi_threshold,
                   'out_of_region_msisdn_threshold': op_tc.out_of_region_msisdn_threshold,
                   'out_of_region_threshold': op_tc.out_of_region_threshold,
                   'non_home_network_threshold': op_tc.non_home_network_threshold,
                   'historic_imei_threshold': op_tc.historic_imei_threshold,
                   'historic_imsi_threshold': op_tc.historic_imsi_threshold,
                   'historic_msisdn_threshold': op_tc.historic_msisdn_threshold,
                   'perform_msisdn_import': config.region_config.import_msisdn_data,
                   'perform_rat_import': config.region_config.import_rat_data,
                   'perform_leading_zero_check': not disable_leading_zero_check,
                   'perform_null_checks': not disable_null_check,
                   'perform_unclean_checks': not disable_clean_check,
                   'perform_region_checks': not disable_region_check,
                   'perform_home_network_check': not disable_home_check,
                   'perform_historic_checks': not disable_historic_check,
                   'perform_auto_analyze': not disable_auto_analyze,
                   'leading_zero_suspect_limit': op_tc.leading_zero_suspect_limit})
    with importer_factory.make_data_importer('operator', input_file, config, statsd, conn, metadata_conn,
                                             run_id, metrics_root, metrics_run_root, **params) as importer:
        importer.import_data()

    Import the CSV operator data found in INPUT into the PostgreSQL database.

    OPERATOR_ID is an ID up to 16 characters to unique identify the operator.
    
Import the CSV operator data found in INPUT into the PostgreSQL database.
OPERATOR_ID is an ID up to 16 characters to unique identify the operator.
Import the CSV operator data found in INPUT into the PostgreSQL database . OPERATOR_ID is an ID up to 16 characters to unique identify the operator .
def operator(ctx, config, statsd, logger, run_id, conn, metadata_conn, command, metrics_root, metrics_run_root,
             operator_id, input_file, disable_leading_zero_check, disable_null_check, disable_clean_check,
             disable_region_check, disable_home_check, disable_historic_check, disable_auto_analyze):
    op_tc = config.operator_threshold_config
    params = _common_import_params(ctx)
    params.update({'operator_id': operator_id,
                   'null_imei_threshold': op_tc.null_imei_threshold,
                   'null_imsi_threshold': op_tc.null_imsi_threshold,
                   'null_msisdn_threshold': op_tc.null_msisdn_threshold,
                   'null_rat_threshold': op_tc.null_rat_threshold,
                   'null_threshold': op_tc.null_threshold,
                   'unclean_imei_threshold': op_tc.unclean_imei_threshold,
                   'unclean_imsi_threshold': op_tc.unclean_imsi_threshold,
                   'unclean_threshold': op_tc.unclean_threshold,
                   'out_of_region_imsi_threshold': op_tc.out_of_region_imsi_threshold,
                   'out_of_region_msisdn_threshold': op_tc.out_of_region_msisdn_threshold,
                   'out_of_region_threshold': op_tc.out_of_region_threshold,
                   'non_home_network_threshold': op_tc.non_home_network_threshold,
                   'historic_imei_threshold': op_tc.historic_imei_threshold,
                   'historic_imsi_threshold': op_tc.historic_imsi_threshold,
                   'historic_msisdn_threshold': op_tc.historic_msisdn_threshold,
                   'perform_msisdn_import': config.region_config.import_msisdn_data,
                   'perform_rat_import': config.region_config.import_rat_data,
                   'perform_leading_zero_check': not disable_leading_zero_check,
                   'perform_null_checks': not disable_null_check,
                   'perform_unclean_checks': not disable_clean_check,
                   'perform_region_checks': not disable_region_check,
                   'perform_home_network_check': not disable_home_check,
                   'perform_historic_checks': not disable_historic_check,
                   'perform_auto_analyze': not disable_auto_analyze,
                   'leading_zero_suspect_limit': op_tc.leading_zero_suspect_limit})
    with importer_factory.make_data_importer('operator', input_file, config, statsd, conn, metadata_conn,
                                             run_id, metrics_root, metrics_run_root, **params) as importer:
        importer.import_data()
def operator ( ctx , config , statsd , logger , run_id , conn , metadata_conn , command , metrics_root , metrics_run_root , operator_id , input_file , disable_leading_zero_check , disable_null_check , disable_clean_check , disable_region_check , disable_home_check , disable_historic_check , disable_auto_analyze ) : op_tc = config . operator_threshold_config params = _common_import_params ( ctx ) params . update ( { 'operator_id' : operator_id , 'null_imei_threshold' : op_tc . null_imei_threshold , 'null_imsi_threshold' : op_tc . null_imsi_threshold , 'null_msisdn_threshold' : op_tc . null_msisdn_threshold , 'null_rat_threshold' : op_tc . null_rat_threshold , 'null_threshold' : op_tc . null_threshold , 'unclean_imei_threshold' : op_tc . unclean_imei_threshold , 'unclean_imsi_threshold' : op_tc . unclean_imsi_threshold , 'unclean_threshold' : op_tc . unclean_threshold , 'out_of_region_imsi_threshold' : op_tc . out_of_region_imsi_threshold , 'out_of_region_msisdn_threshold' : op_tc . out_of_region_msisdn_threshold , 'out_of_region_threshold' : op_tc . out_of_region_threshold , 'non_home_network_threshold' : op_tc . non_home_network_threshold , 'historic_imei_threshold' : op_tc . historic_imei_threshold , 'historic_imsi_threshold' : op_tc . historic_imsi_threshold , 'historic_msisdn_threshold' : op_tc . historic_msisdn_threshold , 'perform_msisdn_import' : config . region_config . import_msisdn_data , 'perform_rat_import' : config . region_config . import_rat_data , 'perform_leading_zero_check' : not disable_leading_zero_check , 'perform_null_checks' : not disable_null_check , 'perform_unclean_checks' : not disable_clean_check , 'perform_region_checks' : not disable_region_check , 'perform_home_network_check' : not disable_home_check , 'perform_historic_checks' : not disable_historic_check , 'perform_auto_analyze' : not disable_auto_analyze , 'leading_zero_suspect_limit' : op_tc . leading_zero_suspect_limit } ) with importer_factory . make_data_importer ( 'operator' , input_file , config , statsd , conn , metadata_conn , run_id , metrics_root , metrics_run_root , ** params ) as importer : importer . import_data ( )
Import the CSV operator data found in INPUT into the PostgreSQL database.
Import the CSV operator data found in INPUT into the PostgreSQL database .
"""
    Import the CSV operator data found in INPUT into the PostgreSQL database.

    OPERATOR_ID is an ID up to 16 characters to unique identify the operator.
    """
ctx
config
statsd
logger
run_id
conn
metadata_conn
command
metrics_root
metrics_run_root
operator_id
input_file
disable_leading_zero_check
disable_null_check
disable_clean_check
disable_region_check
disable_home_check
disable_historic_check
disable_auto_analyze