Hi Katalooners,
I would like to display records from a bigquery table.
I follow this tutorial :
But, I have this blocked error NoSuchMethodError for the line :
Job queryJob = bigQuery.create(JobInfo.newBuilder(queryConfig).setJobId(jobId).build());
java.lang.NoSuchMethodError: com.google.api.services.bigquery.model.**JobStatistics.getTransactionInfo()**Lcom/google/api/services/bigquery/model/TransactionInfo;
with the lib :
google-api-services-bigquery-v2-rev459-1.25.0.jar
with the lib :
google-api-services-bigquery-v2-rev397-1.24.1.jar
I have this error :
java.lang.NoSuchMethodError : com.google.api.services.bigquery.model.**JobStatistics.getNumChildJobs()**Ljava/lang/Long;
Has anyone managed to do a simple query with a bigquery database and Katalon?
Thank you
I looked into the Maven Central repository and searched projects with key “bigquery”. I found 2 projects:
This tutorial uses the library https://mvnrepository.com/artifact/com.google.cloud/google-cloud-bigquery
But you, @moustik , are using the other library https://mvnrepository.com/artifact/com.google.apis/google-api-services-bigquery
You are using a wrong library with similar name. Possibly you need to change your dependency.
1 Like
Hi @kazurayam ,
I removed it but I have this error now :
for this line
I make project/clean + refresh but always this same error.
2nd question :
how to make the tutorial code work on Katalon? (because I have a lot of trouble transposing it)
You got this error
because your code refers to the class com.google.api.services.bigquery.model.JobConfiguraiton
.
This class is possibly contained in the jar file of the https://mvnrepository.com/artifact/com.google.apis/google-api-services-bigquery project, which you removed already.
I don’t know, and I am not interested in it.
Possibly your code contains a lot of mistakes. But you haven’t showed your code and errors. Therefore others can not say anything about it.
It is necessary to have the lib : * https://mvnrepository.com/artifact/com.google.apis/google-api-services-bigquery
because i have this error message :
for the line 42 :
Here is the source code of the tutorial: https://github.com/sohamkamani/java-bigquery-example/blob/main/src/main/java/com/sohamkamani/App.java
The sample has the following statement:
import com.google.cloud.bigquery.BigQuery;
Please note the package name is com.google.cloud.bigquery
.
On the other hand, your code looks like this:
moustik:
for the line 42 :
You once wrote an import statement com.google.api.services.bigquery.model.*
. This is different from the sample code of the tutorial. Simply, it is your mistake. Possibly you should change the import statement:
//import com.google.api.services.bigquery.model.*;
import com.google.cloud.bigquery.*;
If you check the Maven Central repository, you can see the release history of the following 2 projects:
The former project (com.google.cloud) is still being maintained actively.
But the latter project (com.google.apis) released the last one at March 2020, and since then has no updates.
These are different projects; They are not interchangeable.
Thank u.
and is there an email address to contact Google about “google-api-services-bigquery” libs ?