Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 820a505

Browse files
1 parent 6e51250 commit 820a505

File tree

121 files changed

+100
-102209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+100
-102209
lines changed

google/cloud/bigtable_v2/services/bigtable/async_client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ class BigtableAsyncClient:
8282
parse_authorized_view_path = staticmethod(BigtableClient.parse_authorized_view_path)
8383
instance_path = staticmethod(BigtableClient.instance_path)
8484
parse_instance_path = staticmethod(BigtableClient.parse_instance_path)
85+
materialized_view_path = staticmethod(BigtableClient.materialized_view_path)
86+
parse_materialized_view_path = staticmethod(
87+
BigtableClient.parse_materialized_view_path
88+
)
8589
table_path = staticmethod(BigtableClient.table_path)
8690
parse_table_path = staticmethod(BigtableClient.parse_table_path)
8791
common_billing_account_path = staticmethod(
@@ -1700,8 +1704,7 @@ def execute_query(
17001704
if regex_match and regex_match.group("name"):
17011705
header_params["name"] = regex_match.group("name")
17021706

1703-
if request.app_profile_id is not None:
1704-
# execute_query currently requires empty header support. TODO: remove after support is added
1707+
if request.app_profile_id:
17051708
header_params["app_profile_id"] = request.app_profile_id
17061709

17071710
if header_params:

google/cloud/bigtable_v2/services/bigtable/client.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,28 @@ def parse_instance_path(path: str) -> Dict[str, str]:
238238
m = re.match(r"^projects/(?P<project>.+?)/instances/(?P<instance>.+?)$", path)
239239
return m.groupdict() if m else {}
240240

241+
@staticmethod
242+
def materialized_view_path(
243+
project: str,
244+
instance: str,
245+
materialized_view: str,
246+
) -> str:
247+
"""Returns a fully-qualified materialized_view string."""
248+
return "projects/{project}/instances/{instance}/materializedViews/{materialized_view}".format(
249+
project=project,
250+
instance=instance,
251+
materialized_view=materialized_view,
252+
)
253+
254+
@staticmethod
255+
def parse_materialized_view_path(path: str) -> Dict[str, str]:
256+
"""Parses a materialized_view path into its component segments."""
257+
m = re.match(
258+
r"^projects/(?P<project>.+?)/instances/(?P<instance>.+?)/materializedViews/(?P<materialized_view>.+?)$",
259+
path,
260+
)
261+
return m.groupdict() if m else {}
262+
241263
@staticmethod
242264
def table_path(
243265
project: str,
@@ -2128,8 +2150,7 @@ def execute_query(
21282150
if regex_match and regex_match.group("name"):
21292151
header_params["name"] = regex_match.group("name")
21302152

2131-
if request.app_profile_id is not None:
2132-
# execute_query currently requires empty header support. TODO: remove after support is adde
2153+
if request.app_profile_id:
21332154
header_params["app_profile_id"] = request.app_profile_id
21342155

21352156
if header_params:

google/cloud/bigtable_v2/types/bigtable.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ class ReadRowsRequest(proto.Message):
7373
7474
Values are of the form
7575
``projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>``.
76+
materialized_view_name (str):
77+
Optional. The unique name of the MaterializedView from which
78+
to read.
79+
80+
Values are of the form
81+
``projects/<project>/instances/<instance>/materializedViews/<materialized_view>``.
7682
app_profile_id (str):
7783
This value specifies routing for replication.
7884
If not specified, the "default" application
@@ -139,6 +145,10 @@ class RequestStatsView(proto.Enum):
139145
proto.STRING,
140146
number=9,
141147
)
148+
materialized_view_name: str = proto.Field(
149+
proto.STRING,
150+
number=11,
151+
)
142152
app_profile_id: str = proto.Field(
143153
proto.STRING,
144154
number=5,
@@ -354,6 +364,12 @@ class SampleRowKeysRequest(proto.Message):
354364
355365
Values are of the form
356366
``projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>``.
367+
materialized_view_name (str):
368+
Optional. The unique name of the MaterializedView from which
369+
to read.
370+
371+
Values are of the form
372+
``projects/<project>/instances/<instance>/materializedViews/<materialized_view>``.
357373
app_profile_id (str):
358374
This value specifies routing for replication.
359375
If not specified, the "default" application
@@ -368,6 +384,10 @@ class SampleRowKeysRequest(proto.Message):
368384
proto.STRING,
369385
number=4,
370386
)
387+
materialized_view_name: str = proto.Field(
388+
proto.STRING,
389+
number=5,
390+
)
371391
app_profile_id: str = proto.Field(
372392
proto.STRING,
373393
number=2,

owl-bot-staging/bigtable/v2/.coveragerc

Lines changed: 0 additions & 13 deletions
This file was deleted.

owl-bot-staging/bigtable/v2/.flake8

Lines changed: 0 additions & 33 deletions
This file was deleted.

owl-bot-staging/bigtable/v2/MANIFEST.in

Lines changed: 0 additions & 2 deletions
This file was deleted.

owl-bot-staging/bigtable/v2/README.rst

Lines changed: 0 additions & 143 deletions
This file was deleted.

owl-bot-staging/bigtable/v2/docs/_static/custom.css

Lines changed: 0 additions & 3 deletions
This file was deleted.

owl-bot-staging/bigtable/v2/docs/bigtable_v2/bigtable.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

owl-bot-staging/bigtable/v2/docs/bigtable_v2/services_.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)