BigQuery:如何将库加载到 Java 代码中 [英] BigQuery: How to load library into java code

查看:34
本文介绍了BigQuery:如何将库加载到 Java 代码中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Bigquery 的新开发人员.我正在关注 https://developers.google.com/bigquery/bigquery-api- 中的教程使用 Java 代码和从 https://developers.google.com/bigquery 导入的库的快速入门/客户端库.但是,我无法将库加载到 Java 代码中,例如import com.google.api.services.bigquery.model.DatasetList;导入 com.google.api.services.bigquery.model.GetQueryResultsResponse;导入 com.google.api.services.bigquery.model.Job请告诉我如何解决这个案例.

I am a new dev in Bigquery. I am following tutorial in https://developers.google.com/bigquery/bigquery-api-quickstart with Java code and imported library from https://developers.google.com/bigquery/client-libraries. However, I couldn't load library into Java code such as import com.google.api.services.bigquery.model.DatasetList; import com.google.api.services.bigquery.model.GetQueryResultsResponse; import com.google.api.services.bigquery.model.Job Please tell me know how to solve this case.

谢谢

推荐答案

如果您使用的是 maven,这很容易通过以下 2 个依赖完成(您可以将版本更改为最新版本)

if you are using maven this is done easily with the following 2 dependence (you can changes the version to the latest one)

    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-storage</artifactId>
        <version>v1-rev12-1.19.0</version>
    </dependency>

    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-bigquery</artifactId>
        <version>v2-rev168-1.19.0</version>
    </dependency> 

这篇关于BigQuery:如何将库加载到 Java 代码中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆