airbytehq / airbytehq/airbyte

[source-bigquery] Access denied external tables - missing Drive scope

Offen
#75,270 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area/connectors autoteam community connectors/source/bigquery needs-triage team/extensibility type/bug
Vorherrschende Sprache
Python
Sterne
22.1k
Forks
5.3k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

### Connector Name

source-bigquery

### Connector Version

0.4.5

### What step the error happened?

During the sync

### Relevant information

When the connector tries to sync external tables on BigQuery, e.g., a table connected to Google Sheets, it throws an error, and the sync is unable to complete

The job explorer on BigQuery, and also the Airbyte logs, show:

`Access Denied: BigQuery BigQuery: Permission denied while getting Drive credentials.`

This is because no additional scopes, like `https://www.googleapis.com/auth/drive.readonly` are passed when initializing the BigQuery client in the connector.

I know for these particular cases there's a Google Sheets connector, but sometimes, using that connector is forbidden (GCP SA policies within the company), and workarounds like external tables on BigQuery are needed.

The fix seems straightforward and adding the additional scopes on the `BigQueryDatabase` could be one of the potential fixes, but I'm open to other suggestions.

I tested the implementation locally with additional scopes and it worked as expected. If that's ok, I'll be more than happy to provide an MR.

### Relevant log output

```shell

```

### Contribute

- [x] Yes, I want to contribute

---
**Internal Tracking:** https://github.com/airbytehq/oncall/issues/11728

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.