简体   繁体   English

大查询权限 | bigquery.readsession 可以对 bigquery 数据集做什么?

[英]BIGQUERY PERMISSION | What is bigquery.readsession can do to bigquery dataset?

I do not understand about the BigQuery Read Session User permission.我不了解BigQuery Read Session User权限。 I wonder if I got assigned this role.我想知道我是否被分配了这个角色。 Can I query the data set in the Bigquery via python SDK?我可以通过python SDK查询Bigquery中的数据集吗? 在此处输入图像描述

I tried:我试过:

from google.cloud import bigquery
import os

os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'Path/xxx.json'
project_id = 'Project_ID'
client = bigquery.Client()
client.query(`SQL`)

Got:得到了:

Forbidden: 403 Access Denied: Table <> User does not have permission to query table <>, or perhaps it does not exist in location <>.

Location: <>
Job ID: <>

To be clear, I want to know what the read session means in Bigquery.明确地说,我想知道read session在 Bigquery 中的含义。

When the Storage Read API is used, structured data is sent in a binary serialization format which allows parallelism.当使用Storage Read API时,结构化数据以允许并行的二进制序列化格式发送。 Storage Read API provides fast access to managed BigQuery storage using RPC protocol.For the usage of Storage Read API, ReadSession has to be created. Storage Read API 使用 RPC 协议提供对托管 BigQuery 存储的快速访问。要使用 Storage Read API,必须创建ReadSession

The ReadSession message contains the information about maximum number of streams, the snapshot time, the set of columns to return, and the predicate filter which is provided to CreateReadSession RPC. ReadSession 消息包含有关最大流数、快照时间、要返回的列集以及提供给 CreateReadSession RPC 的谓词过滤器的信息。 A ReadSession response contains the set of Stream identifiers which is used by Storage API. The Stream identifier that is returned from the ReadSession response is used to read all the data from the table. ReadSession 响应包含存储 API 使用的一组 Stream 标识符。从 ReadSession 响应返回的 Stream 标识符用于从表中读取所有数据。 For more information, you can check this documentation .有关更多信息,您可以查看此文档

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

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