简体   繁体   English

在Google Apps脚本中使用BigQuery连接到Google Spreadsheet

[英]Using BigQuery in Google Apps Scripts to connect to Google Spreadsheet

I've enabled BigQuery in API console and in my GAS app and I tried using the example from this thread: Accessing BigQuery with Google Spreadsheet 我已经在API控制台和GAS应用程序中启用了BigQuery,并尝试使用该线程中的示例: 使用Google Spreadsheet访问BigQuery

I got the Project ID but I don't know how to connect to my Google Spreadsheet. 我获得了项目ID,但是我不知道如何连接到我的Google Spreadsheet。

How do you use BigQuery in GAS to connect to Google Spreadsheet anyway? 无论如何,您如何在GAS中使用BigQuery连接到Google Spreadsheet? Do you input the Spreadsheet as a dataset in the API console? 您是否在API控制台中将电子表格输入为数据集? How is that done? 怎么做?

The V2 documentation has several tutorials and samples but none about connecting to a Google Spreadsheet using GAS. V2文档包含一些教程和示例,但没有关于使用GAS连接到Google Spreadsheet的信息。

Thanks. 谢谢。

You can call Google BigQuery from Spreadsheet using GAS. 您可以使用GAS从Spreadsheet调用Google BigQuery。 But you can't read values in Google Spreadsheet from Google BigQuery Queries. 但是您无法从Google BigQuery查询中读取Google Spreadsheet中的值。

Google BigQuery is separate product where you have to upload the data into Google BigQuery to query. Google BigQuery是单独的产品,您必须将数据上传到Google BigQuery进行查询。 Google BigQuery wont read the Spreadsheet automatically. Google BigQuery不会自动读取电子表格。 You got to export the Spreasheet as CSV first and upload into BigQuery before you can query the data. 您必须先将Spreasheet导出为CSV,然后上传到BigQuery中,然后才能查询数据。

What you can do is you can use the Spreadsheet as a Front end to BigQuery , for example users can populate some fields in the spreadsheet and GAS can use that values and query the BigQuery to get results and populate the spreadsheet and use visualization gadgets like charts in spreadsheet to view the data. 您可以做的是将Spreadsheet用作BigQuery的前端,例如,用户可以填充电子表格中的某些字段,而GAS可以使用该值并查询BigQuery以获取结果并填充电子表格,并使用可视化工具(例如图表)在电子表格中查看数据。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM