Skip to content

Commit

Permalink
🐛 Add oauth scope for bigquery calls (#3808)
Browse files Browse the repository at this point in the history
This is required to make sure this works with the application default
credentials. Otherwise, they are rejected even if the service account
has the correct permissions
  • Loading branch information
jaym authored Apr 23, 2024
1 parent ceb706d commit 9597c64
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions providers/gcp/resources/bigquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (g *mqlGcpProjectBigqueryService) datasets() ([]interface{}, error) {
}
projectId := g.ProjectId.Data

client, err := conn.Client()
client, err := conn.Client("https://www.googleapis.com/auth/bigquery")
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -248,7 +248,7 @@ func (g *mqlGcpProjectBigqueryServiceDatasetAccessEntry) id() (string, error) {
func (g *mqlGcpProjectBigqueryServiceDataset) tables() ([]interface{}, error) {
conn := g.MqlRuntime.Connection.(*connection.GcpConnection)

client, err := conn.Client()
client, err := conn.Client("https://www.googleapis.com/auth/bigquery")
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -383,7 +383,7 @@ func (g *mqlGcpProjectBigqueryServiceTable) id() (string, error) {
func (g *mqlGcpProjectBigqueryServiceDataset) models() ([]interface{}, error) {
conn := g.MqlRuntime.Connection.(*connection.GcpConnection)

client, err := conn.Client()
client, err := conn.Client("https://www.googleapis.com/auth/bigquery")
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -469,7 +469,7 @@ func (g *mqlGcpProjectBigqueryServiceModel) id() (string, error) {
func (g *mqlGcpProjectBigqueryServiceDataset) routines() ([]interface{}, error) {
conn := g.MqlRuntime.Connection.(*connection.GcpConnection)

client, err := conn.Client()
client, err := conn.Client("https://www.googleapis.com/auth/bigquery")
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 9597c64

Please sign in to comment.