1234567891011 |
- from src.kg_construction.mongodb_cache import MongoDBConn
- if __name__ == "__main__":
- host_port = 'mongodb://8.142.150.114:27018/'
- db_name = 'nebula-kg-cache'
- assemble = 'mechatronics-entity-seed'
- mongoDBConn = MongoDBConn()
- collection = mongoDBConn.initConnect(host_port=host_port, db_name=db_name, assemble=assemble)
- triple_sample_templete = {'name': 'MongoDB', 'type': 'database'}
- collection.insert_one(triple_sample_templete)
- print(collection)
|