Skip to content
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

Python 3 fix gbq #4335

Conversation

Yuriowindiatmoko2401
Copy link

@Yuriowindiatmoko2401 Yuriowindiatmoko2401 commented Nov 4, 2019

  • Feature
  • Bug Fix

Description

bug fix

  • “ImportError: file_cache is unavailable” when using Python client for Google service account file_cache

  • TypeError: '<' not supported between instances of 'str' and 'int'

Feature

  • add query cost for bigquery data scanned

Thanks for @msstoci

@Yuriowindiatmoko2401 Yuriowindiatmoko2401 changed the base branch from master to python-3 November 4, 2019 13:29
@Yuriowindiatmoko2401
Copy link
Author

@arikfr
@NicolasLM please review

Copy link
Member

@arikfr arikfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, please see comments.

'cost_per_tb': {
'type': 'number',
'title': 'Google Big Query cost per Tb scanned',
'default': 1.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default pricing for querying is $5 per TB, no?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o.. yaa my bad it was BigQuery Storage API pricing

$1.10 per TB read The BigQuery Storage API is not included in the free tier.

will be edit asap

redash/query_runner/big_query.py Show resolved Hide resolved
@@ -146,7 +160,7 @@ def _get_bigquery_service(self):
http = httplib2.Http(timeout=settings.BIGQUERY_HTTP_TIMEOUT)
http = creds.authorize(http)

return build("bigquery", "v2", http=http)
return build("bigquery", "v2", http=http, cache_discovery=False)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What this do?

Copy link
Author

@Yuriowindiatmoko2401 Yuriowindiatmoko2401 Nov 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a bug fix when this kind of error happened
“ImportError: file_cache is unavailable” when using Python client for Google service account file_cache

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a known issue in the google-api-python-client library: googleapis/google-api-python-client#299 (comment) I would at least apply this fix.

@arikfr
Copy link
Member

arikfr commented Jan 21, 2020

Seems like this is abandoned. I'm closing this now, but you're welcome to re-open after addressing the comments. Thanks!

@arikfr arikfr closed this Jan 21, 2020
@jezdez
Copy link
Member

jezdez commented Jan 22, 2020

@arikfr This seems like legitimate issues we've also seen while we're doing the rebase against the Python 3 version of Redash.

@arikfr
Copy link
Member

arikfr commented Jan 22, 2020

Unless this PR is revived there will be a separate PR for the int+str issue.

@jezdez
Copy link
Member

jezdez commented Jan 23, 2020

Yeah, I also found that one issue was fixed in #4481 already.

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

Successfully merging this pull request may close these issues.

3 participants