GitHub user dosubot[bot] added a comment to the discussion: Missing Project ID 
on BigQuery

<!-- Greeting -->
Hello @esgungor! I'm [Dosu](https://dosu.dev), here to help you with any bugs, 
questions, or contributions you may have while we wait for a human maintainer. 
Let’s tackle this together!

<!-- Answer -->
To address the issue of missing project IDs in SQL queries for cross-project 
access in BigQuery when using Superset, you can configure the connection to 
include the project ID in the SQLAlchemy URI. Here's how you can do it:

1. **Install the SQLAlchemy BigQuery Driver**: Ensure you have the 
`sqlalchemy-bigquery` driver installed. You can add it to your Docker 
requirements:

   ```bash
   echo "sqlalchemy-bigquery" >> ./docker/requirements-local.txt
   ```

2. **Service Account Setup**: Create a service account in Google Cloud 
Platform, grant it access to the necessary BigQuery datasets, and download the 
JSON configuration file.

3. **Configure the Connection in Superset**: When setting up a new BigQuery 
connection in Superset, use the SQLAlchemy URI format that includes the project 
ID:

   ```
   bigquery://{project_id}
   ```

4. **Secure Extra Configuration**: In the database configuration form in 
Superset, go to the **Advanced** tab and add a JSON blob to the **Secure 
Extra** field with the following format:

   ```json
   {
     "credentials_info": <contents of credentials JSON file>
   }
   ```

This setup should help ensure that the project ID is included in SQL queries, 
allowing for successful cross-project access 
<sup>[[1]](https://github.com/apache/superset/blob/master/docs/docs/configuration/databases.mdx)</sup>.


<!-- 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/ba3777e7-349b-4047-a2e2-0a544eda07b6?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/ba3777e7-349b-4047-a2e2-0a544eda07b6?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/ba3777e7-349b-4047-a2e2-0a544eda07b6?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/ba3777e7-349b-4047-a2e2-0a544eda07b6?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/ba3777e7-349b-4047-a2e2-0a544eda07b6?feedback_type=hallucination)
 | [Bug 
Report](https://app.dosu.dev/response-feedback/ba3777e7-349b-4047-a2e2-0a544eda07b6?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/ba3777e7-349b-4047-a2e2-0a544eda07b6?feedback_type=other)</sup>


GitHub link: 
https://github.com/apache/superset/discussions/33464#discussioncomment-13167992

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to