airbytehq / airbytehq/airbyte

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

Aberta
#75,270 3 comentários 0 reações 0 responsáveis Ver no GitHub
area/connectors autoteam community connectors/source/bigquery needs-triage team/extensibility type/bug
Linguagem predominante
Python
Estrelas
22.1k
Forks
5.4k
Merge médio
14h 41min
PRs com merge (30d)
587

Descrição

### 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

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.