Skip to content

Feature Request: Add support for 'Allow Large Results' to BigQuery connector #10474

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

Closed
ptthompsonzul opened this issue Jun 29, 2015 · 5 comments

Comments

@ptthompsonzul
Copy link

gbq.py currently returns an error if the result of a query is what Google considers to be 'Large'. The google api allows jobs to be sent with a flag to allow large results. It would be very beneficial to provide this as an option in the BigQuery connector.

@jorisvandenbossche
Copy link
Member

cc @jacobschaer @sean-schaefer

@ghost
Copy link

ghost commented Aug 22, 2015

I've made in improvement to the to_gbq function in Pull Request #10857 . The pull request hasn't been merged, but keep an eye on it.

The improvement is to add an argument destination_table to the to_gbq function , so that you can redirect the results of a query directly to a BigQuery table instead of a pandas DataFrame. When the destination_table is specified, I set allowLargeResults to true.

Note: A destination table is required to enable large results in BigQuery. Google BigQuery documentation for allowLargeResults is available at the following link under the heading Returning large query results:
https://cloud.google.com/bigquery/querying-data?hl=en

@jacobschaer
Copy link
Contributor

Agree with @parthea1 - the reason we didn't add it originally was because we didn't want to support creating tables. Also, we were concerned about how to do this in an intuitive way for users who aren't very familiar with BigQuery. When reading results you are also writing them... I'm not particuarly interested in implementing this feature, but I agree it would be nice to have.

@parthea
Copy link
Contributor

parthea commented Sep 10, 2016

@jreback Can this be closed, or do you expect a PR for this?

See my related PR here: #11209

Issue #13531 is also a duplicate of this. Setting allowLargeResults requires a destination table so you are effectively saving the result to a gbq table. If we decide to support this it would be trivial to save the results to a destination table without setting allowLargeResults.

@jreback
Copy link
Contributor

jreback commented Feb 26, 2017

moved issue to googleapis/python-bigquery-pandas#15

@jreback jreback closed this as completed Feb 26, 2017
@jorisvandenbossche jorisvandenbossche added this to the No action milestone Feb 26, 2017
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

5 participants