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

Add cautionary note about performance in get_row_count method #998

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions parsons/google/google_bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,10 @@ def get_row_count(self, schema: str, table_name: str) -> int:
"""
Gets the row count for a BigQuery materialization.

Caution: This method uses SELECT COUNT(*) which can be expensive for large tables,
especially those with many columns. This is because BigQuery scans all table data
to perform the count, even though only the row count is returned.

`Args`:
schema: str
The schema name
Expand Down
Loading