dosubot[bot] commented on issue #33465:
URL: https://github.com/apache/superset/issues/33465#issuecomment-2886023958
<!-- Answer -->
To address the issue of missing project IDs in SQL queries for cross-project
access in BigQuery when using a service account, you need to ensure that the
SQLAlchemy URI is correctly configured to include the project ID. This can be
done by setting the `sqlalchemy_uri_placeholder` to include the project ID
format:
```python
sqlalchemy_uri_placeholder = "bigquery://{project_id}"
```
Additionally, when building the SQLAlchemy URI, ensure that the
`build_sqlalchemy_uri` method uses the `project_id` from the service account
credentials. The `encrypted_extra` should contain valid service account
credentials with the `project_id` field. This setup allows Superset to
construct the correct SQLAlchemy URI for cross-project access in BigQuery
<sup>[[1]](https://github.com/apache/superset/blob/master/superset/db_engine_specs/bigquery.py)</sup>.
If the SQLAlchemy modification to separate `billing_project_id` and
`project_id` is still pending approval, you might need to manually adjust the
query format or wait for the update to be merged and released.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
---
<sup>Help Dosu learn! Give it feedback: [Great
Response](https://app.dosu.dev/response-feedback/b5fa1301-fb5c-4986-bba9-e4720f26d6a6?feedback_type=great_response)
| [Irrelevant
Answer](https://app.dosu.dev/response-feedback/b5fa1301-fb5c-4986-bba9-e4720f26d6a6?feedback_type=irrelevant_answer)
| [Incorrect
Sources](https://app.dosu.dev/response-feedback/b5fa1301-fb5c-4986-bba9-e4720f26d6a6?feedback_type=incorrect_sources)
| [Too
Verbose](https://app.dosu.dev/response-feedback/b5fa1301-fb5c-4986-bba9-e4720f26d6a6?feedback_type=too_verbose)
|
[Hallucination](https://app.dosu.dev/response-feedback/b5fa1301-fb5c-4986-bba9-e4720f26d6a6?feedback_type=hallucination)
| [Bug
Report](https://app.dosu.dev/response-feedback/b5fa1301-fb5c-4986-bba9-e4720f26d6a6?feedback_type=bug_report)
|
[Other](https://app.dosu.dev/response-feedback/b5fa1301-fb5c-4986-bba9-e4720f26d6a6?feedback_type=other)</sup>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]