简体   繁体   English

如何通过 API 或 CLI 在 Google BigQuery 中取消授权查看

[英]How can I unathorized view in Google BigQuery via API or CLI

There is not in an official document or anyone mentioned it.官方文件或任何人都没有提到它。 please help请帮忙

  • Step 1步骤1

Enter the following command to write the access controls for yourdataset to a JSON file.输入以下命令以将数据集的访问控制写入 JSON 文件。 yourdataset is in yourproject.你的数据集在你的项目中。

bq show --format=prettyjson \ yourproject:yourdataset > /tmp/yourdataset.json   
  • Step 2第2步

Make your changes to the "access" section of the JSON file.对 JSON 文件的“访问”部分进行更改。

  • Step 3步骤 3

When your edits are complete, use the update command and include the JSON file using the --source flag.编辑完成后,使用更新命令并使用 --source 标志包含 JSON 文件。 Note: when you apply the JSON file that contains the access controls, the existing access controls are overwritten.注意:当您应用包含访问控制的 JSON 文件时,现有的访问控制将被覆盖。

bq update --source /tmp/yourdataset.json yourdataset   

If the dataset is in a project other than your default project, add the project ID to the dataset name in the following format: project_id:dataset.如果数据集位于默认项目以外的项目中,请按以下格式将项目 ID 添加到数据集名称:project_id:dataset。

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

相关问题 如何使用 google cloud bigquery 进行集成测试 - How can I make integration tests with google cloud bigquery 如何查看 BigQuery Storage API 日志? - How can I see BigQuery Storage API Logs? 如何通过 cli / rest api / 云功能运行 Google Cloud Build 触发器? - How to run a Google Cloud Build trigger via cli / rest api / cloud functions? 如何将 BigQuery 视图作为 csv 文件传输到 Google Cloud Storage 存储桶 - How to Transfer a BigQuery view to a Google Cloud Storage bucket as a csv file 如何通过 Java 互操作从 Clojure 中的 Google BigQuery 获取 select 数据? - How to select data from Google BigQuery in Clojure via Java interop? 如何通过 CLI 获取 Google Cloud SQL 实例的 IP - How to get IP of Google Cloud SQL instance via CLI 如何将数据从 Google Analytic 流式传输到 Bigquery - How can streaming data from Google Analytic to Bigquery 无法使用 dbplyr 在 BigQuery 中查询 VIEW - Can't query VIEW in BigQuery with dbplyr 如何估算 Google BigQuery 成本? - How to Estimate Google BigQuery cost? 我可以在通过 AWS CLI 在 DynamoDB 表上启用 TTL 的同时设置 TTL 值吗? - Can I set the TTL value while enabling TTL on a DynamoDB table via the AWS CLI?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM