The Simba BigQuery JDBC driver has some known limitations when attempting to query datasets in a project other than the billing project. While there is no official solution to this issue, several workarounds:
Modify the Connection String: Some users have reported success by including the project ID of the dataset within the connection string. An example modification might look like this:
jdbc:bigquery://[https://www.googleapis.com/bigquery/v2:443;ProjectId=desired_project_id;BillingProjectId=billing_project_id;OAuthType=0](https://www.googleapis.com/bigquery/v2:443;ProjectId=desired_project_id;BillingProjectId=billing_project_id;OAuthType=0);...
However, this approach may not work for everyone and should be tested thoroughly.
Driver Version Adjustment: There have been instances where users resolved issues by either updating to a newer version of the Simba driver or reverting to an older one. It’s crucial to review the release notes for each version of the driver to understand the impact of any changes.
Utilize Alternative Client Libraries: For those who can work outside of JDBC, client libraries such as the Python client library for BigQuery offer more flexibility and do not share the same limitations. Here’s a brief example of how to use it:
Driver Version Adjustment: There have been instances where users resolved issues by either updating to a newer version of the Simba driver or reverting to an older one. It’s crucial to review the release notes for each version of the driver to understand the impact of any changes.
Utilize Alternative Client Libraries: For those who can work outside of JDBC, client libraries such as the Python client library for BigQuery offer more flexibility and do not share the same limitations. Here’s a brief example of how to use it:
from google.cloud import bigquery
client = bigquery.Client(project='desired_project_id')
query = "SELECT * FROM dataset.table"
results = client.query(query).result()
for row in results:
    print(row)
More details can be found in the official Python client library documentation.
Explore Third-Party Connectors: Connectors provided by third-party tools may offer alternative methods to connect to BigQuery datasets in different projects. Be aware that these connectors also come with their own set of limitations and should be evaluated for compatibility with your specific requirements.
It’s important to note that these workarounds are not officially supported solutions and may not be suitable for all scenarios. They should be tested in a non-production environment to avoid any unintended consequences.
Lastly, if you decide to implement any of these workarounds, ensure that you have a comprehensive backup and recovery strategy in place, and that you understand the potential implications for data integrity and billing.