GCP Bigquery使用Java查询数据所需的依赖JAR包:

huangapple go评论123阅读模式
英文:

Dependency Jars required for querying data from GCP Bigquery using java

问题

需要用Java从GCP Bigquery查询数据所需的依赖项。

我选择了GCP的Java客户端库,而不是REST API,来查询GCP Bigquery中的数据。我添加了一个Maven pom.xml文件,以获取所需的依赖项,如下所示:

  1. <dependencyManagement>
  2. <dependencies>
  3. <!-- https://mvnrepository.com/artifact/com.google.cloud/libraries-bom -->
  4. <dependency>
  5. <groupId>com.google.cloud</groupId>
  6. <artifactId>libraries-bom</artifactId>
  7. <version>26.17.0</version>
  8. <type>pom</type>
  9. </dependency>
  10. </dependencies>
  11. </dependencyManagement>
  12. <dependencies>
  13. <dependency>
  14. <groupId>com.google.cloud</groupId>
  15. <artifactId>google-cloud-bigquery</artifactId>
  16. <version>2.27.1</version>
  17. </dependency>
  18. </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

  1. &lt;dependencyManagement&gt;
  2. &lt;dependencies&gt;
  3. &lt;!-- https://mvnrepository.com/artifact/com.google.cloud/libraries-bom --&gt;
  4. &lt;dependency&gt;
  5. &lt;groupId&gt;com.google.cloud&lt;/groupId&gt;
  6. &lt;artifactId&gt;libraries-bom&lt;/artifactId&gt;
  7. &lt;version&gt;26.17.0&lt;/version&gt;
  8. &lt;type&gt;pom&lt;/type&gt;
  9. &lt;/dependency&gt;
  10. &lt;/dependencies&gt;
  11. &lt;/dependencyManagement&gt;
  12. &lt;dependencies&gt;
  13. &lt;dependency&gt;
  14. &lt;groupId&gt;com.google.cloud&lt;/groupId&gt;
  15. &lt;artifactId&gt;google-cloud-bigquery&lt;/artifactId&gt;
  16. &lt;version&gt;2.27.1&lt;/version&gt;
  17. &lt;/dependency&gt;
  18. &lt;/dependencies&gt;

It gave the 74 jars. truely all those jars required??
or any correction required?

答案1

得分: 1

  1. 如果在官方文档中提到的话,它必须是依赖所需的正确jar包数量,或者尝试使用BigQuery API参考文档中“开始之前”部分描述的pom内容。:
  2. <dependencyManagement>
  3. <dependencies>
  4. <dependency>
  5. <groupId>com.google.cloud</groupId>
  6. <artifactId>libraries-bom</artifactId>
  7. <version>26.18.0</version>
  8. <type>pom</type>
  9. <scope>import</scope>
  10. </dependency>
  11. </dependencies>
  12. </dependencyManagement>
  13. <dependencies>
  14. <dependency>
  15. <groupId>com.google.cloud</groupId>
  16. <artifactId>google-cloud-storage</artifactId>
  17. </dependency>
  18. </dependencies>
  19. 如果您继续向下滚动,您将找到用于使用客户端库的IDE插件(这可能对您的用例有帮助):
  20. 如果您使用Visual Studio CodeIntelliJEclipse,可以使用以下IDE插件将客户端库添加到您的项目中:
  21. - Cloud Code for VS Code
  22. - Cloud Code for IntelliJ
  23. - Cloud Tools for Eclipse
  1. <details>
  2. <summary>英文:</summary>
  3. 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&#39;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>

  1. If you scroll down a bit more you will find IDE plugins for using client libraries(that might be helpful to your use case):
  2. &gt;If you&#39;re using Visual Studio Code, IntelliJ, or Eclipse, you can add client libraries to your project using the following IDE plugins:
  3. &gt;
  4. &gt; - Cloud Code for VS Code
  5. &gt; - Cloud Code for IntelliJ
  6. &gt; - Cloud Tools for Eclipse
  7. [1]: https://cloud.google.com/bigquery/docs/reference/libraries#install
  8. </details>

huangapple
  • 本文由 发表于 2023年7月10日 17:38:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/76652504.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定