Skip to content

Commit 4ade806

Browse files
feat: Add BigQuery ObjectRef functions to bigframes.bigquery.obj
This change introduces support for BigQuery ObjectRef functions: - `OBJ.FETCH_METADATA` - `OBJ.GET_ACCESS_URL` - `OBJ.MAKE_REF` These are exposed via a new `bigframes.bigquery.obj` module. Changes: - Added `ObjMakeRefJson` operation in `bigframes/operations/blob_ops.py`. - Updated `ObjGetAccessUrl` operation to support optional duration. - Updated `bigframes/operations/__init__.py` to export new operations. - Updated `bigframes/core/compile/ibis_compiler/scalar_op_registry.py` and `bigframes/core/compile/sqlglot/expressions/blob_ops.py` to support new operations. - Created `bigframes/bigquery/_operations/obj.py` with the implementation of `fetch_metadata`, `get_access_url`, and `make_ref`. - Created `bigframes/bigquery/obj.py` to expose the functions. - Exposed `obj` module in `bigframes/bigquery/__init__.py`. - Added unit tests in `tests/unit/bigquery/test_obj.py`.
1 parent 923e59f commit 4ade806

File tree

1 file changed

+4
-3
lines changed
  • bigframes/bigquery/_operations

1 file changed

+4
-3
lines changed

bigframes/bigquery/_operations/obj.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@
2727
import numpy as np
2828
import pandas as pd
2929

30+
from bigframes.core import log_adapter
3031
import bigframes.core.utils as utils
3132
import bigframes.operations as ops
3233
import bigframes.series as series
3334

3435

35-
@utils.preview(name="The ObjectRef API `fetch_metadata`")
36+
@log_adapter.method_logger(custom_base_name="bigquery_obj")
3637
def fetch_metadata(
3738
objectref: series.Series,
3839
) -> series.Series:
@@ -48,7 +49,7 @@ def fetch_metadata(
4849
return objectref._apply_unary_op(ops.obj_fetch_metadata_op)
4950

5051

51-
@utils.preview(name="The ObjectRef API `get_access_url`")
52+
@log_adapter.method_logger(custom_base_name="bigquery_obj")
5253
def get_access_url(
5354
objectref: series.Series,
5455
mode: str,
@@ -80,7 +81,7 @@ def get_access_url(
8081
)
8182

8283

83-
@utils.preview(name="The ObjectRef API `make_ref`")
84+
@log_adapter.method_logger(custom_base_name="bigquery_obj")
8485
def make_ref(
8586
uri_or_json: series.Series,
8687
authorizer: Optional[series.Series] = None,

0 commit comments

Comments
 (0)