Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _feature_to_data_source(
bq_uri = feature_group._gca_resource.big_query.big_query_source.input_uri
assert bq_uri

fully_qualified_table = bq_uri.lstrip("bq://")
fully_qualified_table = bq_uri.removeprefix("bq://")
assert fully_qualified_table

query = (
Expand Down
7 changes: 4 additions & 3 deletions google/cloud/aiplatform/preview/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
from google.protobuf import struct_pb2
from google.protobuf import json_format


_MULTIMODAL_METADATA_SCHEMA_URI = (
"gs://google-cloud-aiplatform/schema/dataset/metadata/multimodal_1.0.0.yaml"
)
Expand Down Expand Up @@ -1122,7 +1121,9 @@ def to_bigframes(self) -> "bigframes.pandas.DataFrame": # type: ignore # noqa:
A BigFrames dataframe.
"""
bigframes = _try_import_bigframes()
return bigframes.pandas.read_gbq_table(self.bigquery_table.lstrip("bq://"))
return bigframes.pandas.read_gbq_table(
self.bigquery_table.removeprefix("bq://")
)

@classmethod
@base.optional_sync()
Expand Down Expand Up @@ -1409,7 +1410,7 @@ def assemble(
)
result = assemble_lro.result(timeout=None)
_LOGGER.log_action_completed_against_resource("data", "assembled", self)
table_id = result.bigquery_destination.lstrip("bq://")
table_id = result.bigquery_destination.removeprefix("bq://")
if load_dataframe:
session_options = bigframes.BigQueryOptions(
credentials=initializer.global_config.credentials,
Expand Down
3 changes: 2 additions & 1 deletion vertexai/resources/preview/feature_store/offline_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ def _feature_to_data_source(
bq_uri = feature_group._gca_resource.big_query.big_query_source.input_uri
assert bq_uri

fully_qualified_table = bq_uri.lstrip("bq://")
fully_qualified_table = bq_uri.removeprefix("bq://")

assert fully_qualified_table

query = (
Expand Down
Loading