예제 #1
0
 def __init__(self):
     self.db_insert = MongDb(mongo_conf_insert['host'], mongo_conf_insert['port'], mongo_conf_insert['final_db'],
                        mongo_conf_insert['username'],
                        mongo_conf_insert['password'])
     self.db = MongDb(mongo_conf['host'], mongo_conf['port'], mongo_conf['final_db'],
                      mongo_conf['username'],
                      mongo_conf['password'])
     self.sourceTable = 'judgement_wenshu'
     self.targetTable = 'judgement_wenshu'
     self.time_regex  = re.compile("\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}")
예제 #2
0
 def __init__(self):
     self.db_insert = MongDb(mongo_conf_insert['host'], mongo_conf_insert['port'], mongo_conf_insert['final_db'],
                        mongo_conf_insert['username'],
                        mongo_conf_insert['password'])
     self.db = MongDb(mongo_conf['host'], mongo_conf['port'], mongo_conf['final_db'],
                      mongo_conf['username'],
                      mongo_conf['password'])
     self.province_parser = ProvinceParser(province_city, phone_city, region_city, city_city)
     self.sourceTable = 'land_auction'
     self.targetTable = 'land_auction'
예제 #3
0
 def __init__(self):
     self.db_remove = MongDb(mongo_conf_remove['host'],
                             mongo_conf_remove['port'],
                             mongo_conf_remove['final_db'],
                             mongo_conf_remove['username'],
                             mongo_conf_remove['password'])
     self.db = MongDb(mongo_conf['host'], mongo_conf['port'],
                      mongo_conf['final_db'], mongo_conf['username'],
                      mongo_conf['password'])
     self.sourceTable = 'acquirer_event'
     self.targetTable = 'acquirer_event'
예제 #4
0
 def __init__(self):
     self.db_insert = MongDb(mongo_conf_insert['host'],
                             mongo_conf_insert['port'],
                             mongo_conf_insert['final_db'],
                             mongo_conf_insert['username'],
                             mongo_conf_insert['password'])
     self.db = MongDb(mongo_conf['host'], mongo_conf['port'],
                      mongo_conf['final_db'], mongo_conf['username'],
                      mongo_conf['password'])
     self.sourceTable = 'top_ten_shareholder'
     self.targetTable = 'top_ten_shareholder'
 def __init__(self):
     self.db_insert = MongDb(mongo_conf_insert['host'],
                             mongo_conf_insert['port'],
                             mongo_conf_insert['final_db'],
                             mongo_conf_insert['username'],
                             mongo_conf_insert['password'])
     self.db = MongDb(mongo_conf['host'], mongo_conf['port'],
                      mongo_conf['final_db'], mongo_conf['username'],
                      mongo_conf['password'])
     self.sourceTable = 'land_project_selling'
     self.targetTable = 'land_project_selling'
     self.acreage_unit_map = {u'㎡': u'平方米', u'平方米': u'平方米', u'公顷': u'公顷'}
예제 #6
0
 def __init__(self):
     self.db_insert = MongDb(mongo_conf_insert['host'],
                             mongo_conf_insert['port'],
                             mongo_conf_insert['final_db'],
                             mongo_conf_insert['username'],
                             mongo_conf_insert['password'])
     self.db = MongDb(mongo_conf['host'], mongo_conf['port'],
                      mongo_conf['final_db'], mongo_conf['username'],
                      mongo_conf['password'])
     self.db_company = MongDb(mongo_conf['host'], mongo_conf['port'],
                              mongo_conf['final_db'],
                              mongo_conf['username'],
                              mongo_conf['password'])
예제 #7
0
 def __init__(self):
     self.db_insert = MongDb(mongo_conf_insert['host'], mongo_conf_insert['port'], mongo_conf_insert['final_db'],
                             mongo_conf_insert['username'],
                             mongo_conf_insert['password'])
     self.db = MongDb(mongo_conf['host'], mongo_conf['port'], mongo_conf['final_db'],
                      mongo_conf['username'],
                      mongo_conf['password'])
     self.db_company = MongDb(mongo_conf['host'], mongo_conf['port'], mongo_conf['final_db'],
                      mongo_conf['username'],
                      mongo_conf['password'])
     self.sourceTable = 'investment_institutions'
     self.targetTable = 'investment_institutions'
     self.company_table = 'company_information_pedata'
     self.company_data = self._init_data()
예제 #8
0
 def __init__(self):
     self.db_insert = MongDb(mongo_conf_insert['host'],
                             mongo_conf_insert['port'],
                             mongo_conf_insert['final_db'],
                             mongo_conf_insert['username'],
                             mongo_conf_insert['password'])
     self.db = MongDb(mongo_conf['host'], mongo_conf['port'],
                      mongo_conf['final_db'], mongo_conf['username'],
                      mongo_conf['password'])
     self.db_company = MongDb(mongo_conf['host'], mongo_conf['port'],
                              mongo_conf['final_db'],
                              mongo_conf['username'],
                              mongo_conf['password'])
     self.sourceTable = 'acquirer_event'
     self.targetTable = 'acquirer_event'
     self.company_table = 'company_information_pedata'
     self.time_regex = re.compile("\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}")
     self.company_data = self._init_data()
예제 #9
0
 def __init__(self, conf):
     mongo_conf = conf.get('mongo', {})
     self.db = MongDb(mongo_conf.get('host', ''),
                      mongo_conf.get('port', ''),
                      mongo_conf.get('db_name', ''),
                      mongo_conf.get('username', ''),
                      mongo_conf.get('passwd', ''))
     self.log = conf.get('log')
     self.collection_names = self.db.db.collection_names()
예제 #10
0
    import json
    from i_entity_extractor.common_old import log

    route = EntityExtractorRoute(conf)
    topic_info = route.all_topics.get(topic_id, None)
    begin_time = time.time()
    obj = JudgeWenshuExtractor(topic_info, log)

    mongo_conf = {
        'host': '172.16.215.16',
        'port': 40042,
        'final_db': 'app_data',
        'username': "******",
        'password': "******",
    }
    db = MongDb(mongo_conf['host'], mongo_conf['port'], mongo_conf['final_db'],
                mongo_conf['username'], mongo_conf['password'])

    cursor = db.db["judgement_wenshu"].find({})
    for item in cursor:
        item.pop("_id")
        print json.dumps(item, encoding='utf8', ensure_ascii=False)
        break
    num = 0

    extract_data = {
        "_in_time":
        "2017-04-12 14:25:38.652455",
        "_site_record_id":
        "b371fa10e638d52856e3764541643ab3",
        "_src": [{
            "site": "www.caseshare.cn",