GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Creating a load job in a project other than the client's project results in error · Issue #473 · googleapis/python-bigquery

This repository was archived by the owner on Mar 6, 2026. It is now read-only.
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

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

Copy link
Copy link
Closed
#482
Closed
Creating a load job in a project other than the client's project results in error#473
#482
Copy link
Assignees
plamut
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.

Description

@tchang-f5
tchang-f5
opened on Jan 18, 2021
Issue body actions

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.

python-bigquery/google/cloud/bigquery/client.py

Line 2594 in 80944f0

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

Activity

  1. product-auto-label
    added
    api: bigqueryIssues related to the googleapis/python-bigquery API.
    on Jan 18, 2021
  2. plamut
    added
    type: questionRequest for information or clarification. Not an issue.
    on Jan 19, 2021
  3. plamut commented on Jan 21, 2021

    @plamut
    plamut
    on Jan 21, 2021
    Contributor
    More actions

    I can confirm the reported behavior. The load_table_from_file() receives the target project name, sets it on the job, but then the _do_multipart_upload() indeed just uses the project configured by the client in the URL. Ditto for resumable uploads.

    Thanks for catching and reporting that!

  4. plamut
    self-assigned this
    on Jan 21, 2021
  5. plamut
    added
    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.
    and removed
    type: questionRequest for information or clarification. Not an issue.
    on Jan 21, 2021
  6. tswast
    closed this as completedin #482on Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @plamut
    plamut

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.