是否可以使用服务帐户在 BigQuery 中安排查询“Schedule Query"?特征 ? [英] Is it possible to use service accounts to schedule queries in BigQuery "Schedule Query" feature ?

查看:22
本文介绍了是否可以使用服务帐户在 BigQuery 中安排查询“Schedule Query"?特征 ?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用 BigQuery 的 Beta 计划查询功能.详细信息:https://cloud.google.com/bigquery/docs/scheduling-queries

We are using the Beta Scheduled query feature of BigQuery. Details: https://cloud.google.com/bigquery/docs/scheduling-queries

我们几乎没有在夜间运行 ETL 计划查询来优化聚合并降低查询成本.它运作良好,没有太多问题.

We have few ETL scheduled queries running overnight to optimize the aggregation and reduce query cost. It works well and there hasn't been much issues.

当使用自己的凭据安排查询的人员离开组织时,就会出现问题.我知道在这种情况下我们可以更新凭证".

The problem arises when the person who scheduled the query using their own credentials leaves the organization. I know we can do "update credential" in such cases.

我通读了文档并尝试了一些,但无法确定我们是否可以使用服务帐户而不是个人帐户来安排查询.

I read through the document and also gave it some try but couldn't really find if we can use a service account instead of individual accounts to schedule queries.

服务帐户更干净,并且与 IAM 框架的其余部分相关联,并且不依赖于单个用户.

Service accounts are cleaner and ties up to the rest of the IAM framework and is not dependent on a single user.

因此,如果您有关于预定查询和服务帐户的任何其他信息,请分享.

So if you have any additional information regarding scheduled queries and service account please share.

感谢您花时间阅读问题并回答问题.

Thanks for taking time to read the question and respond to it.

问候

推荐答案

据我所知,很遗憾,您还不能使用服务帐户直接安排查询.也许 Google 员工会纠正我,但 BigQuery 文档隐含地说明了这一点:

As far as I know, unfortunately you can't use a service account to directly schedule queries yet. Maybe a Googler will correct me, but the BigQuery docs implicitly state this:

https://cloud.google.com/bigquery/docs/scheduling-queries#quotas

使用创建者的凭据执行预定查询,并且项目,就像您自己执行查询一样

A scheduled query is executed with the creator's credentials and project, as if you were executing the query yourself

如果您需要使用服务帐户(顺便说一句,这是一种很好的做法),那么列出了一些解决方法 此处.我已经在此处为后代提出了 FR.

If you need to use a service account (which is great practice BTW), then there are a few workarounds listed here. I've raised a FR here for posterity.

这篇关于是否可以使用服务帐户在 BigQuery 中安排查询“Schedule Query"?特征 ?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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