Skip to content

Commit b295d74

Browse files
chalmerlowetswast
andauthored
Update google/cloud/bigquery_v2/services/centralized_service/client.py
Co-authored-by: Tim Sweña (Swast) <[email protected]>
1 parent 002fbdb commit b295d74

File tree

1 file changed

+2
-1
lines changed
  • google/cloud/bigquery_v2/services/centralized_service

1 file changed

+2
-1
lines changed

google/cloud/bigquery_v2/services/centralized_service/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ def _parse_dataset_path(self, dataset_path: str) -> Tuple[Optional[str], str]:
9999
A tuple of (project_id, dataset_id).
100100
"""
101101
if "." in dataset_path:
102-
project_id, dataset_id = dataset_path.split(".", 1)
102+
# Use rsplit to handle legacy paths like `google.com:my-project.my_dataset`.
103+
project_id, dataset_id = dataset_path.rsplit(".", 1)
103104
return project_id, dataset_id
104105
return self.project, dataset_path
105106

0 commit comments

Comments
 (0)