Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I do not understand about the BigQuery Read Session User permission. I wonder if I got assigned this role. Can I query the data set in the Bigquery via python SDK? enter image description here

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.

like image 347
Grid Varavithya Vitvara Avatar asked Sep 07 '25 21:09

Grid Varavithya Vitvara


1 Answers

When the Storage Read API is used, structured data is sent in a binary serialization format which allows parallelism. 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.

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. 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. For more information, you can check this documentation.

like image 71
Shipra Sarkar Avatar answered Sep 12 '25 04:09

Shipra Sarkar