Skip to content

Commit

Permalink
Skip datagroup creation when running into permission error (#1161)
Browse files Browse the repository at this point in the history
* Skip datagroup creation when running into permission error

* Update generator/views/datagroups.py

Co-authored-by: Sean Rose <[email protected]>

---------

Co-authored-by: Sean Rose <[email protected]>
  • Loading branch information
scholtzan and sean-rose authored Feb 11, 2025
1 parent 5003aa4 commit 9e00226
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions generator/views/datagroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,14 @@ def _get_datagroup_from_bigquery_view(
view=view,
)
except DryRunError as e:
raise ValueError(
f"Unable to find {source_table_id} referenced in {full_table_id}"
) from e
if e.error == Errors.PERMISSION_DENIED and e.use_cloud_function:
print(
f"Skip datagroup creation for {source_table_id} due to permission error"
)
else:
raise ValueError(
f"Unable to find {source_table_id} referenced in {full_table_id}"
) from e

return []

Expand Down

0 comments on commit 9e00226

Please sign in to comment.