我目前在用 Clojure 编写的后端工作。简而言之,我正在尝试将一些数据存储到 BigQuery 中,但是当我尝试创建数据集时,会出现标题中报告的错误。这里有一些代码:
(defn create-service []
(.getService (BigQueryOptions/getDefaultInstance)))
Run Code Online (Sandbox Code Playgroud)
(defn create-dataset [dataset-name]
"Given a name, it creates a dataset in BigQuery"
(println "creating a dataset called: " dataset-name)
(def bigquery (create-service))
(def dataset-info (.build (DatasetInfo/newBuilder dataset-name)))
(.create bigquery dataset-info)
)
Run Code Online (Sandbox Code Playgroud)
我也在 BigQueryImpl 中尝试了其他方法,将库降级,但结果是一样的。
堆栈跟踪:
java.lang.IllegalArgumentException: No matching method found: create for class com.google.cloud.bigquery.BigQueryImpl, compiling:(main.clj:172:24)
Exception in thread "main" java.lang.IllegalArgumentException: No matching method found: create for class com.google.cloud.bigquery.BigQueryImpl, compiling:(main.clj:172:24)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3657)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3651)
at clojure.lang.Compiler.compile1(Compiler.java:7474)
at clojure.lang.Compiler.compile(Compiler.java:7541)
at …Run Code Online (Sandbox Code Playgroud)