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

fix: access MATERIALIZED_VIEW with read_gbq #1070

Merged
merged 2 commits into from
Oct 9, 2024
Merged

Conversation

Genesis929
Copy link
Collaborator

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: s Pull request size is small. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Oct 9, 2024
@Genesis929 Genesis929 changed the title fix: corrected inability to access MATERIALIZED_VIEW with read_gbq fix: access MATERIALIZED_VIEW with read_gbq Oct 9, 2024
@Genesis929 Genesis929 marked this pull request as ready for review October 9, 2024 21:04
@Genesis929 Genesis929 requested review from a team as code owners October 9, 2024 21:04
@Genesis929 Genesis929 requested a review from shobsi October 9, 2024 21:04
@Genesis929 Genesis929 added the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 9, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 9, 2024
@@ -124,6 +125,17 @@ def validate_table(
if table_ref.dataset_id.startswith("_"):
return False

# Materialized views,does not support snapshot
if table_type == "MATERIALIZED_VIEW":
warnings.warn(
Copy link
Contributor

@shobsi shobsi Oct 9, 2024

Choose a reason for hiding this comment

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

we should add a test for this warning

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated.

@Genesis929 Genesis929 requested a review from shobsi October 9, 2024 21:15
@Genesis929 Genesis929 enabled auto-merge (squash) October 9, 2024 22:03
@Genesis929 Genesis929 merged commit 601e984 into main Oct 9, 2024
22 of 23 checks passed
@Genesis929 Genesis929 deleted the mat_view_fix_huanc branch October 9, 2024 22:05
"source_table",
[
"bigframes-dev.thelook_ecommerce.orders",
"bigframes-dev.bigframes_tests_sys.base_table_mat_view",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm a concerned about hard coding this table. Could we at least include something in the scripts/ directory that can recreate this table if needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Got it, will add that.

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: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants