Beispiel #1
0
        LOGGER.info('Time Submitted: ' + str(datetime.datetime.now()))
        LOGGER.info('Status:                Completed')

        LOGGER.info('\n********** Log Import Options **********\n')
        # Initialize the connection with the server
        try:
            db = Database(server)
            disaggregation = Disaggregation(server)
            LOGGER.info('Server: ' + str(server))
        except:
            LOGGER.error('Error: Check connection to database server')
            file_skeleton(OUTFILE)
            sys.exit()

        try:
            loc_info = db.location_info_disagg(exposure_db, exposure_name)
            loc_info['ExchangeRate_Original'] = copy.deepcopy(
                loc_info['ExchangeRate'])
            loc_info.loc[loc_info['CurrencyCode'] == 'USD',
                         'ExchangeRate'] = 1.0
            LOGGER.info('Exposure DB: ' + str(exposure_db))
            LOGGER.info('Exposure Name: ' + str(exposure_name))
        except:
            LOGGER.error('Error: Check the exposure db or exposure name')
            file_skeleton(OUTFILE)
            sys.exit()

        try:
            analysis_sid = db.analysis_sid(analysis_name)
            LOGGER.info('Analysis SID: ' + str(analysis_sid))
        except:
Beispiel #2
0
        LOGGER.info('Time Submitted: ' + str(datetime.datetime.now()))
        LOGGER.info('Status:                Completed')

        LOGGER.info('\n********** Log Import Options **********\n')
        # Initialize the connection with the server
        try:
            db = Database(server)
            disaggregation = Disaggregation(server)
            LOGGER.info('Server: ' + str(server))
        except:
            LOGGER.error('Error: Check connection to database server')
            file_skeleton(OUTFILE)
            sys.exit()

        try:
            loc_info = db.location_info_disagg(exposure_db, exposure_name)
            loc_info['ExchangeRate_Original'] = copy.deepcopy(loc_info['ExchangeRate'])
            loc_info.loc[loc_info['CurrencyCode'] == 'USD', 'ExchangeRate'] = 1.0
            LOGGER.info('Exposure DB: ' + str(exposure_db))
            LOGGER.info('Exposure Name: ' + str(exposure_name))
        except:
            LOGGER.error('Error: Check the exposure db or exposure name')
            file_skeleton(OUTFILE)
            sys.exit()

        try:
            analysis_sid = db.analysis_sid(analysis_name)
            LOGGER.info('Analysis SID: ' + str(analysis_sid))
        except:
            LOGGER.error('Error: Failed to extract the analysis SID from analysis name')
            file_skeleton(OUTFILE)