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 — bigquery dataset should not always take project argument from client · Issue #2118 · googleapis/google-cloud-python

bigquery dataset should not always take project argument from client #2118

New issue
Copy link
New issue
Copy link
Closed
Closed
bigquery dataset should not always take project argument from client#2118
Copy link
Assignees
tseaver
Labels
api: bigqueryIssues related to the BigQuery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Description

@elibixby
elibixby
opened on Aug 18, 2016
Issue body actions

The project in which a dataset resides is not necessarily the project in which jobs involving the dataset will be executed. For example, if querying the bigquery public data hacker news dataset the following will error

client = bigquery.Client(project='bigquery-public-data')
dataset = client.dataset('hacker_news')
client.extract_table_storage(..., dataset.table('comments'))

Because the user can't create a job in the project 'bigquery-public-data'. Instead the fairly convoluted:

client = bigquery.Client(project='my-project')
client.extract_table_storage(..., bigquery.Client(project='bigquery-public-data').dataset('hacker_news').table('comments'))

Despite the fact that the client involved will never be used.

The proposed fix is to add a kwarg project to the Dataset class which overrides the originating project.

Reacted by Tim Sweña (Swast)

Activity

  1. tseaver
    added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    api: bigqueryIssues related to the BigQuery API.
    on Aug 18, 2016
  2. tseaver
    self-assigned this
    on Aug 18, 2016
  3. tseaver commented on Aug 18, 2016

    @tseaver
    tseaver
    on Aug 18, 2016
    Contributor
    More actions

    @elibixby Thanks for the report!

  4. tswast commented on Aug 26, 2016

    @tswast
    tswast
    on Aug 26, 2016
    Contributor
    More actions

    +1 to this. I filed a similar issue in gcloud-java googleapis/google-cloud-java#1123 which does provide a project as part of the dataset identifier (but it doesn't always use it, yikes!)

  5. tseaver
    closed this as completedin #2809on Dec 5, 2016
  6. richkadel
    added a commit that references this issue on May 6, 2017

    Allow overriding dataset's project during construction.

    This issue will close once commit 6249e3f is merged into the 'master' branch.
    6249e3f
  7. parthea
    added a commit that references this issue on Apr 1, 2026

    refactor: support agg_ops.RowNumberOp for sqlglot compiler (#2118)

    482e412
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @tseaver
    tseaver

Labels

api: bigqueryIssues related to the BigQuery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

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.