Skip to content

Conversation

@chelsea-lin
Copy link
Contributor

This change is adding bbq.json_query_array and warning bbq.json_extract_array deprecated. This change aligns with BigQuery SQL, which is deprecating JSON_EXTRACT_STRING_ARRAY method in the doc

…array This commit introduces the `bbq.json_value_array` method, which provides similar functionality to `JSON_VALUE_ARRAY` in BigQuery Standard SQL. This new function extracts a JSON array and converts its elements to SQL STRING values. It also supports coercing these string values to other data types using the `value_dtype` parameter. The `bbq.json_extract_string_array` method has been marked as deprecated and will be removed in a future version. You should migrate to `bbq.json_value_array` for equivalent functionality. The following changes were made: - Added `JSONValueArray` operation class in `bigframes/operations/json_ops.py`. - Implemented the `json_value_array` function in `bigframes/bigquery/_operations/json.py`. - Marked `json_extract_string_array` as deprecated with a `UserWarning` and updated its docstring. - Added unit tests for `json_value_array` in `tests/unit/bigquery/test_json.py`. - Added system tests for `json_value_array` in `tests/system/small/bigquery/test_json.py`, covering various input types, JSON structures, and `value_dtype` conversions.
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Jun 13, 2025
@chelsea-lin chelsea-lin marked this pull request as ready for review June 13, 2025 22:24
@chelsea-lin chelsea-lin requested review from a team as code owners June 13, 2025 22:24
@chelsea-lin chelsea-lin added the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 16, 2025
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 16, 2025
@chelsea-lin chelsea-lin merged commit 019051e into main Jun 16, 2025
22 of 24 checks passed
@chelsea-lin chelsea-lin deleted the feat-json-value-array branch June 16, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: m Pull request size is medium.

2 participants