Skip to content

Conversation

@ericfe-google
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-magics API. labels Mar 11, 2025
@ericfe-google ericfe-google marked this pull request as ready for review March 11, 2025 21:35
@ericfe-google ericfe-google requested review from a team as code owners March 11, 2025 21:35
@ericfe-google ericfe-google requested review from hongalex and sycai March 11, 2025 21:35
@tswast tswast added the owlbot:run Add this label to trigger the Owlbot post processor. label Mar 12, 2025
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Mar 12, 2025
Comment on lines +661 to +662
if not query_result[column].apply(_is_valid_json).all():
return False
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, so the widget only works if all columns are valid JSON? This will return False if there's even one column with one cell that returns false for _is_valid_json.

Please add a docstring explaining more what the expectation is for data for the widget to be supported.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If some columns are not json, the widget actually does work - it simply ignores the non-json columns for purposes of populating the widget, but shows them in the widget's tabular view. I have a separate work in progress to handle this, but it's not included in this branch.

Is it ok to check in what we have, and do a follow-up PR to handle the "some columns not json" scenario?

@tswast tswast merged commit dbb6442 into main Mar 12, 2025
25 checks passed
@tswast tswast deleted the graph branch March 12, 2025 17:56
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-magics API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants