【问题标题】:Export query results from Google Cloud Spanner to Google Sheets将查询结果从 Google Cloud Spanner 导出到 Google 表格
【发布时间】:2018-12-20 03:23:38
【问题描述】:

我想将我的查询结果导出到 Google 表格。有什么方法可以直接或在 Google 表格中使用 AppScript。

【问题讨论】:

标签: javascript reporting-services google-sheets google-cloud-platform google-cloud-spanner


【解决方案1】:

目前无法通过 Google Apps 脚本从 Google Cloud Spanner 直接导出到 Google 表格。

一种方法是按照@RoseLiu 的评论,使用@RedPandaCurios solution

另一种可能的解决方法是使用 Dataflow。您可以使用 Google Cloud Dataflow 将 Google Cloud Spanner 数据库作为 .csv 文件导出到 Google Cloud Storage,然后将 .csv 文件导入 Google 表格。

Dataflow 已经有一个可以从Cloud Spanner to Cloud Storage 导出的模板。作业完成后,您可以通过 Console 或使用 API 从 Storage 下载 .csv 文件。

【讨论】:

  • @JesseScherer 我想一个不错的选择是从 Google Cloud Function 启动 Dataflow 作业(正如我所解释的 here),然后从 AppsScript 发送触发函数本身的 HTTP 请求使用 @ 987654326@。这个解决方案的问题是我们正在向解决方案中添加越来越多的产品:GCF、带模板的数据流、GCS、Sheets API...
猜你喜欢
  • 2019-04-26
  • 1970-01-01
  • 1970-01-01
  • 2017-11-13
  • 1970-01-01
  • 2019-07-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多