小编cor*_*yes的帖子

找不到匹配的方法:为类 com.google.api.services.bigquery.BigQueryImpl 创建

我目前在用 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)

clojure google-bigquery

1
推荐指数
1
解决办法
97
查看次数

标签 统计

clojure ×1

google-bigquery ×1