Python 3.6 使用pydrill storage_update()创建Apache drill存储

Python 3.6 使用pydrill storage_update()创建Apache drill存储,python-3.6,apache-drill,pydrill,Python 3.6,Apache Drill,Pydrill,我正在尝试使用pydrill创建MySQL apache drill存储插件。这是一个错误: RequestError:TransportError(400,'无法识别的字段“类型”(class org.apache.drill.exec.server.rest.pluginofigwrapper),未标记为可忽略(两个已知属性:“config”,“name”)\n位于[来源:org.glassfish.jersey.message.internal。EntityInputStream@1843

我正在尝试使用pydrill创建MySQL apache drill存储插件。这是一个错误:

RequestError:TransportError(400,'无法识别的字段“类型”(class org.apache.drill.exec.server.rest.pluginofigwrapper),未标记为可忽略(两个已知属性:“config”,“name”)\n位于[来源:org.glassfish.jersey.message.internal。EntityInputStream@1843f42f;行:1,列:138](通过引用链:org.apache.drill.exec.server.rest.pluginofigwrapper[“type”])) 这是我的密码:


非常感谢您的帮助!

我找到了解决方案。我们需要将存储名称作为参数传递,并作为配置参数中的json“key”:“value”传递。 以下是更正后的代码:

configu={'config': {'driver': 'com.mysql.jdbc.Driver','enabled': True,'password': 'xyz','type': 'jdbc','url': 'jdbc:mysql://host:3306','username': 'xx'},'name':'xxx'}

drill.storage_update('xxx',config=configu)
答对了!成功了

configu={'config': {'driver': 'com.mysql.jdbc.Driver','enabled': True,'password': 'xyz','type': 'jdbc','url': 'jdbc:mysql://host:3306','username': 'xx'},'name':'xxx'}

drill.storage_update('xxx',config=configu)