Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Creating a load job in a project other than the client's project results in error #473

@tchang-f5

Description

@tchang-f5

The following code

    bq_client = bigquery.Client("project_A")
    job = bq_client.load_table_from_json(data, table, job_config=job_config, project="project_B")

would give the error 400 "Value project_B in content does not agree with value project_A. This can happen when a value set through a parameter is inconsistent with a value set in the request."

It seems the upload URL is always set to the client's project.

upload_url = _MULTIPART_URL_TEMPLATE.format(project=self.project)

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions