我正在尝试在我的DataFrameReader.jdbc()方法中使用谓词:
df = sqlContext.read.jdbc(
url="jdbc:db2://bluemix05.bluforcloud.com:50001/BLUDB:user=****;password=****;sslConnection=true;",
table="GOSALES.BRANCH",
predicates=['WHERE BRANCH_CODE=5']
).cache()
但是,我遇到以下错误:
---------------------------------------------------------------------------
Py4JError Traceback (most recent call last)
...
Py4JError: An error occurred while calling o108.jdbc. Trace:
py4j.Py4JException: Method jdbc([class java.lang.String, class java.lang.String, class [Ljava.lang.Object;, class java.util.Properties]) does not exist
我应该如何向 jdbc 方法调用添加谓词?