简体   繁体   English

gcp 计算实例上的 BigQuery API

[英]BigQuery API on gcp compute instance

New to BigQuery on GCP I'm trying to query tables on a public dataset on gcp. GCP 上 BigQuery 的新手 我正在尝试查询 gcp 上公共数据集上的表。 I'd like to query the tables via my compute instance (debian).我想通过我的计算实例 (debian) 查询表。 Is there a step by step out there?那里有一步一步吗?

Thanks MS谢谢女士

Please find step below.请在下面找到步骤。

  1. Create your Compute Engine with Custom scope and Enable Bigquery access.使用自定义 scope 创建您的计算引擎并启用 Bigquery 访问。 If you already created instance, stop the instance and then click on edit it will allow you to change the service account scope.如果您已经创建了实例,请停止该实例,然后单击编辑,这将允许您更改服务帐户 scope。

在此处输入图像描述

  1. now run your query with bq as below.现在使用 bq 运行您的查询,如下所示。

bq query --nouse_legacy_sql bq 查询 --nouse_legacy_sql
'SELECT * FROM bigquery-public-data .samples.shakespeare limit 2' 'SELECT * FROM bigquery-public-data .samples.shakespeare limit 2'

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 GCP 中是否有任何工具可以修补计算实例? - Is there any tool in GCP to patch the Compute Instance? 如何以当前用户身份使用 GCP 计算 API? - How to use GCP compute API as current user? GCP 计算引擎 API 继续请求 - GCP Compute Engine API keep requesting 如何使用 python 在 GCP 中激活 API Bigquery? - How to activate API Bigquery in GCP with python? 使用 terraform 在 GCP 中为不同的项目 ID 创建计算实例时出现问题 - Problem with creating compute instance in GCP for different project IDs with terraform 通过 HTTP 请求打开/关闭 GCP Compute Engine 实例 - Turn on/off GCP Compute Engine Instance via HTTP request 使用 API 将 Bigquery 数据导出到外部应用程序的最佳 GCP 架构 - The best GCP architecture for exporting Bigquery data to an external application with API 从 gcp_compute_instance_info 模块获取实例名称和 IP - To fetch a instance name and IP from the gcp_compute_instance_info module 使用 Rest api 创建 N 个 GCP 计算实例 - Create N number of GCP compute instances using Rest api 在GCP中创建REST API从BigQuery读取数据 - Creating REST API in GCP to read data from BigQuery
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM