Skip to content

Commit

Permalink
skip dataset validation for creds without permission (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
keyn4 authored Jul 3, 2024
1 parent 312f0ad commit fe68ff5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions target_bigquery/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def ensure_dataset(project_id, dataset_id, location):
try:
client.create_dataset(dataset_ref)
except exceptions.GoogleAPICallError as e:
if e.response.status_code == 403:
logger.info(f"Skipping dataset validation due user does not have permission to create datasets. Using dataset id from config {dataset_id}")
pass
if e.response.status_code == 409: # dataset exists
pass
else:
Expand Down

0 comments on commit fe68ff5

Please sign in to comment.