nebula_test.py 676 B

12345678910111213141516171819
  1. #from graph_database.kg_construction.nebula_kg import NebulaConn
  2. import sys
  3. sys.path.append('/data/codes/ycj/code/graphRag/nebula-llm-qa/graph-database')
  4. from nebula_kg import NebulaConn
  5. if __name__ == "__main__":
  6. host = '116.204.126.213'
  7. port = '9669'
  8. username = 'root'
  9. password = 'nebula'
  10. graphSpace = 'knowledgeGraph'
  11. nebulaDBConn = NebulaConn()
  12. session, connection_pool = nebulaDBConn.initConnect(host=host, port=port, username=username, password=password, graphSpace=graphSpace)
  13. print(session.execute('SHOW TAGS'))
  14. nebulaDBConn.releaseSession(session=session)
  15. nebulaDBConn.releaseConnectionPool(connection_pool=connection_pool)