Skip to content

Conversation

@davidhcoe
Copy link
Contributor

In some situations, the publicProjectId gets passed as the actual project ID and causes an error when we try to create a query job:

    Google.GoogleApiException : The service bigquery has thrown an exception. HttpStatusCode is Forbidden.
     Access Denied: Project bigquery-public-data: User does not have bigquery.jobs.create permission in
     project bigquery-public-data.

This PR adds a check for the public project ID and treats it as if we need to detect the project ID for the caller.

@github-actions github-actions bot modified the milestone: ADBC Libraries 19 Jun 15, 2025
@davidhcoe
Copy link
Contributor Author

davidhcoe commented Jun 15, 2025

Only a new environment configuration was needed to validate this using the DriverTests.CanExecuteQuery test:

"PublicIdTest": {
  "description": "Test using the public project ID",
  "clientId": "$ref:shared.clientId",
  "clientSecret": "$ref:shared.clientSecret",  
  "refreshToken": "$ref:shared.refreshToken",
  "tokenEndpoint": "$ref:shared.tokenEndpoint",
  "includePublicProjectIds": true,
  "queryTimeout": 420,
  "projectId": "bigquery-public-data",
  "query": "SELECT * FROM bigquery-public-data.austin_bikeshare.bikeshare_stations",
  "expectedResults": 101,
  ...
}

@CurtHagenlocher CurtHagenlocher merged commit be46fe5 into apache:main Jun 16, 2025
7 checks passed
@davidhcoe davidhcoe deleted the dev/bq-projectid-fix branch October 24, 2025 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants