英文:
Dependency Jars required for querying data from GCP Bigquery using java
问题
需要用Java从GCP Bigquery查询数据所需的依赖项。
我选择了GCP的Java客户端库,而不是REST API,来查询GCP Bigquery中的数据。我添加了一个Maven pom.xml文件,以获取所需的依赖项,如下所示:
<dependencyManagement>
<dependencies>
<!-- https://mvnrepository.com/artifact/com.google.cloud/libraries-bom -->
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.17.0</version>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
<version>2.27.1</version>
</dependency>
</dependencies>
这将提供74个JAR文件。确实需要所有这些JAR文件吗?或者需要进行任何更正吗?
英文:
Dependency Jars required for querying data from GCP Bigquery using java.
i have to query data from gcp bigquery for that I chose java client libraries of GCP instead of REST API. I added a maven pom.xml to get the required dependencies like
<dependencyManagement>
<dependencies>
<!-- https://mvnrepository.com/artifact/com.google.cloud/libraries-bom -->
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.17.0</version>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
<version>2.27.1</version>
</dependency>
</dependencies>
It gave the 74 jars. truely all those jars required??
or any correction required?
答案1
得分: 1
如果在官方文档中提到的话,它必须是依赖所需的正确jar包数量,或者尝试使用BigQuery API参考文档中“开始之前”部分描述的pom内容。:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.18.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
</dependency>
</dependencies>
如果您继续向下滚动,您将找到用于使用客户端库的IDE插件(这可能对您的用例有帮助):
如果您使用Visual Studio Code、IntelliJ或Eclipse,可以使用以下IDE插件将客户端库添加到您的项目中:
- Cloud Code for VS Code
- Cloud Code for IntelliJ
- Cloud Tools for Eclipse
<details>
<summary>英文:</summary>
If it is in the official documentation it must be the correct numbers of jars needed for dependencies, or try this that pom content that described in the [before you begin][1] section of BigQuery API's reference.:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.18.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
</dependency>
If you scroll down a bit more you will find IDE plugins for using client libraries(that might be helpful to your use case):
>If you're using Visual Studio Code, IntelliJ, or Eclipse, you can add client libraries to your project using the following IDE plugins:
>
> - Cloud Code for VS Code
> - Cloud Code for IntelliJ
> - Cloud Tools for Eclipse
[1]: https://cloud.google.com/bigquery/docs/reference/libraries#install
</details>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论