Skip to content

BigQuery Connector Ignores location Option When Submitting Query Jobs — Always Defaults to US #1348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sbaldassin opened this issue Mar 25, 2025 · 0 comments
Assignees

Comments

@sbaldassin
Copy link

sbaldassin commented Mar 25, 2025

Hi team,

I'm using the Spark BigQuery Connector to query datasets that reside in the EU region, and I’ve encountered a consistent issue.
The connector always executes query jobs in the US region, even when using .option("location", "EU"), resulting in errors like:

Not found: Dataset project:dataset was not found in location US

After investigating the codebase and tracing the execution path, here’s what I found. The connector ultimately submits query jobs using:

bigQuery.create(JobInfo.of(queryJobConfig))

This creates a JobInfo with a JobConfiguration, but without a JobId. In the BigQuery API, location is part of jobReference, not configuration. Therefore, unless a JobId is created with .setLocation(...), BigQuery defaults to US.

Would you please take a look at this one?

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

No branches or pull requests

2 participants