查询在从BigQuery中抽取的表单中完成(需要权限帮助) [英] Queries done in Sheets pulling from BigQuery (permissions help needed)

查看:84
本文介绍了查询在从BigQuery中抽取的表单中完成(需要权限帮助)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在表单中设置脚本,为预定义查询创建多个菜单选项。这样,正常的鲍勃可以得到他的疑问,蒂娜可以得到她的,而弗雷德里克会计可以得到他所需要的信息,而无需写出自己的疑问。他们可以使用有趣的菜单:
截图



数据表在BigQuery中设置,查询使用撰写查询选项正常工作。问题是让脚本中的查询写入工作表中。这是Ido Green如何解决这个问题的一个很好的教程。 https://greenido.wordpress.com/ 2013/12/16 / big-query-and-google-spreadsheet-intergration /



我的问题是获取权限的工作。我相信我批准了BigQuery中的项目ID,但我不确定如何在云端硬盘中执行此操作。这对我来说是新的。让我知道如果有人一步一步来。这是我在尝试运行脚本时遇到的错误:



例外情况:未找到合适的凭据来访问Google云端硬盘。 / p>

感谢您的帮助

解决方案

Google Apps脚本。
修复步骤


  1. 在资源 - >高级Google服务中启用Google Drive API
  2. 在Google Developers Console中为此项目启用Google Drive API

  3. 运行'DriveApp.getRootFolder();'以获取Drive Auth Scope。

  4. I want to set up scripts in sheets creating several menu options for predefined queries. This way normal bob can get his queries, Tina can get hers, and Fredrick in accounting can get the information he needs without out writing his own queries. They can use a fun menu: screenshot

    The data table is set up in BigQuery, and queries work fine using the 'compose query' option. The issue is getting queries written in the script to function in sheets. Here is a nice tutorial by Ido Green on how to go about it. https://greenido.wordpress.com/2013/12/16/big-query-and-google-spreadsheet-intergration/

    My problem is getting the permissions to work. I believe I approved the project ID in BigQuery, but I am unsure of how to do this in Drive. This is new to me. Let me know if someone has the step by step. This is the error I get when I try to run the script:

    "Exception: No suitable credentials found to access Google Drive. Contact the table owner for assistance."

    Thank you for your help

    解决方案

    Got the same issue with my Google Apps script. Steps to fix

    1. Enable Google Drive API in Resources -> Advanced Google Services
    2. Enable Google Drive API in Google Developers Console for this project
    3. Run 'DriveApp.getRootFolder();' to get Drive Auth Scope .

    这篇关于查询在从BigQuery中抽取的表单中完成(需要权限帮助)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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