Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON_EXTRACT: doesn't use double quote path selector #379

Open
adi-eldar opened this issue Jan 1, 2025 · 0 comments
Open

JSON_EXTRACT: doesn't use double quote path selector #379

adi-eldar opened this issue Jan 1, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@adi-eldar
Copy link

What happened?

Doesn't support extracting fields with dots in their name from json fields.
I have a JSON type column in my table which looks like that:
"normalized_fields": {"relation.parent.name": "name", "relation.parent.id": "id"}
I'm trying to extract relation.parent.name field in my query using:
select JSON_VALUE(normalized_fields, '$."relation.parent.name"') from table
When running this query using this image ghcr.io/goccy/bigquery-emulator:latest I get this error:
Error getting spec assets googleapi: Error 400: failed to scan rows: JSON_EXTRACT: doesn't use double quote path selector

What did you expect to happen?

To be able to extract fields with dots in their names from JSON columns (like in BigQuery SDK)

How can we reproduce it (as minimally and precisely as possible)?

Create a JSON column that contains a field with dots in its name, and try to extract this field's value

Anything else we need to know?

No response

@adi-eldar adi-eldar added the bug Something isn't working label Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant