Skip to content

Commit 3657666

Browse files
fix: export handwritten classes AppendRowsStream and ReadRowsStream (#770)
* fix: export handwritten classes * change init file accordingly * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * correct import path * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix import * fix error * delete a commented out line --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 2155eeb commit 3657666

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
from google.cloud.bigquery_storage_v1 import BigQueryReadClient
2222
from google.cloud.bigquery_storage_v1 import gapic_types as types
23+
from google.cloud.bigquery_storage_v1.reader import ReadRowsStream
2324
from google.cloud.bigquery_storage_v1.services.big_query_write.async_client import (
2425
BigQueryWriteAsyncClient,
2526
)
@@ -66,6 +67,7 @@
6667
WriteStreamView,
6768
)
6869
from google.cloud.bigquery_storage_v1.types.table import TableFieldSchema, TableSchema
70+
from google.cloud.bigquery_storage_v1.writer import AppendRowsStream
6971

7072
__all__ = (
7173
"BigQueryReadClient",
@@ -101,6 +103,8 @@
101103
"StreamStats",
102104
"ThrottleState",
103105
"ReadSession",
106+
"AppendRowsStream",
107+
"ReadRowsStream",
104108
"ReadStream",
105109
"WriteStream",
106110
"DataFormat",

packages/google-cloud-bigquery-storage/owlbot.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,26 @@
8787
'"DataFormat",\n \\g<0>',
8888
)
8989

90+
# Expose handwritten classes AppendRowsStream and ReadRowsStream here.
91+
s.replace(
92+
library / "google/cloud/bigquery_storage/__init__.py",
93+
f"from google.cloud.bigquery_storage_{library.name} import BigQueryReadClient",
94+
(
95+
f"from google.cloud.bigquery_storage_{library.name}.writer import AppendRowsStream\n"
96+
"\\g<0>"
97+
f"from google.cloud.bigquery_storage_{library.name}.reader import ReadRowsStream\n"
98+
),
99+
)
100+
s.replace(
101+
library / f"google/cloud/bigquery_storage_{library.name}*/types/__init__.py",
102+
r"""["']ReadSession["']""",
103+
(
104+
'"AppendRowsStream",\n'
105+
' "ReadRowsStream",\n'
106+
' \\g<0>'
107+
),
108+
)
109+
90110
s.move(
91111
[library],
92112
excludes=[

0 commit comments

Comments
 (0)