Skip to content

feature request: to_gbq with a bigframes.pandas.DataFrame should call .to_gbq() from BigQuery DataFrames not download and re-upload #824

@tswast

Description

@tswast

Is your feature request related to a problem? Please describe.

Mixing pandas-gbq and BigFrames can be a recipe for confusion and increased costs. Sending a bigframes.pandas.DataFrame to pandas_gbq.to_gbq results in many queries as pandas-gbq tries to determine the appropriate schema to use for upload.

Describe the solution you'd like

Ideally, if bigframes is installed, pandas-gbq can detect if someone is trying to use a BigQuery DataFrames object with it and call the .to_gbq() method on the object, which would avoid unnecessary queries, a download, and a re-upload of the data.

Describe alternatives you've considered

  • Make BigFrames.pandas.DataFrame less compatible with the pandas interface to avoid confusion by pandas-gbq.
  • Still download and re-upload but skip the schema detection, which should be unnecessary with a BigFrames DataFrame.

Additional context

See internal issue 374235961

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the googleapis/python-bigquery-pandas 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