Skip to content

Commit 5ecd58b

Browse files
committed
set location in read session, too
1 parent 7a44bc3 commit 5ecd58b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

bigframes/session/bq_caching_executor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def __init__(
159159
read_api_execution.ReadApiSemiExecutor(
160160
bqstoragereadclient=bqstoragereadclient,
161161
project=self.bqclient.project,
162+
location=self.bqclient.location or "US",
162163
),
163164
local_scan_executor.LocalScanExecutor(),
164165
)

bigframes/session/read_api_execution.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,15 @@ class ReadApiSemiExecutor(semi_executor.SemiExecutor):
2828
"""
2929

3030
def __init__(
31-
self, bqstoragereadclient: bigquery_storage_v1.BigQueryReadClient, project: str
31+
self,
32+
bqstoragereadclient: bigquery_storage_v1.BigQueryReadClient,
33+
project: str,
34+
*,
35+
location: str,
3236
):
3337
self.bqstoragereadclient = bqstoragereadclient
3438
self.project = project
39+
self.location = location
3540

3641
def execute(
3742
self,
@@ -71,7 +76,7 @@ def execute(
7176
)
7277
# Single stream to maintain ordering
7378
request = bq_storage_types.CreateReadSessionRequest(
74-
parent=f"projects/{self.project}",
79+
parent=f"projects/{self.project}/locations/{self.location}",
7580
read_session=requested_session,
7681
max_stream_count=1,
7782
)

0 commit comments

Comments
 (0)