- nebula 版本:1.1
- 部署方式(分布式 / 单机 / Docker / DBaaS):deb
- 问题的具体描述
可以连接到nebula,但是执行命令时,nebula数据库未做修改,比如创建space,但是nebula中未新增space。
from nebula2.gclient.net import ConnectionPool
from nebula2.Config import Config
config = Config()
config.max_connection_pool_size = 1
connection_pool = ConnectionPool()
assert connection_pool.init([('192.168.248.128', 3699)], config)
client = connection_pool.get_session('root', 'nebula')
assert client is not None
client.execute('CREATE SPACE IF NOT EXISTS test; USE test;'
'CREATE TAG IF NOT EXISTS person(name string, age int);')
这是2.0的python client,你要用1.0的python client,用branch v1.0 或者通过 pip install nebula-python
readme
https://github.com/vesoft-inc/nebula-python/tree/v1.0
1 个赞