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

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

问题描述

我是Bigquery的新开发者。
我在 https://developers.google.com/bigquery/中查看教程。 bigquery-api-quickstart 与Java代码和来自 https://developers.google的.com /大量查询/客户库
但是,我无法将库加载到Java代码中,例如
import com.google.api.services.bigquery.model.DatasetList;
import com.google.api.services.bigquery.model.GetQueryResultsResponse;
import com.google.api.services.bigquery.model.Job

请告诉我如何解决此案例。


$ b $如果你使用的是maven,那么你可以很容易地使用下面的两个依赖关系
来完成这个任务(你可以将版本更改为最新版本)

 <依赖关系> 
< groupId> com.google.apis< / groupId>
< artifactId> google-api-services-storage< / artifactId>
< version> v1-rev12-1.19.0< / version>
< /依赖关系>

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


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.

Thanks

解决方案

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天全站免登陆