Skip to content

Commit 034d08d

Browse files
GarrettWushobsi
authored andcommitted
chore: add logging for blob operations (#1543)
1 parent d86c6af commit 034d08d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

bigframes/operations/blob.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import requests
2424

2525
from bigframes import clients
26+
from bigframes.core import log_adapter
2627
import bigframes.dataframe
2728
import bigframes.exceptions as bfe
2829
from bigframes.operations import base
@@ -33,6 +34,7 @@
3334
FILE_EXT_REGEX = r"(\.[0-9a-zA-Z]+$)"
3435

3536

37+
@log_adapter.class_logger
3638
class BlobAccessor(base.SeriesMethods):
3739
def __init__(self, *args, **kwargs):
3840
if not bigframes.options.experiments.blob:

bigframes/session/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1757,7 +1757,9 @@ def from_glob_path(
17571757

17581758
table = self._create_object_table(path, connection)
17591759

1760-
s = self.read_gbq(table)["uri"].str.to_blob(connection)
1760+
s = self._loader.read_gbq_table(table, api_name="from_glob_path")[
1761+
"uri"
1762+
].str.to_blob(connection)
17611763
return s.rename(name).to_frame()
17621764

17631765
def _create_bq_connection(
@@ -1807,7 +1809,9 @@ def read_gbq_object_table(
18071809
table = self.bqclient.get_table(object_table)
18081810
connection = table._properties["externalDataConfiguration"]["connectionId"]
18091811

1810-
s = self.read_gbq(object_table)["uri"].str.to_blob(connection)
1812+
s = self._loader.read_gbq_table(object_table, api_name="read_gbq_object_table")[
1813+
"uri"
1814+
].str.to_blob(connection)
18111815
return s.rename(name).to_frame()
18121816

18131817

0 commit comments

Comments
 (0)