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

Feature/bq improvements #507

Merged
merged 9 commits into from
Aug 29, 2017
Merged

Feature/bq improvements #507

merged 9 commits into from
Aug 29, 2017

Conversation

drewbanin
Copy link
Contributor

@drewbanin drewbanin commented Aug 15, 2017

  • query federated external tables (google sheets)
  • table materializations
  • fix tests

Query google sheets: #502
Add tables: #504

@drewbanin drewbanin modified the milestone: 0.9.0 rc-1 Aug 17, 2017
@drewbanin drewbanin added bigquery enhancement New feature or request code review and removed code review labels Aug 17, 2017
Copy link
Member

@cmcarthur cmcarthur left a comment

Choose a reason for hiding this comment

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

needs a couple tweaks

@@ -111,6 +118,9 @@ def open_connection(cls, connection):
result = connection.copy()
credentials = connection.get('credentials', {})

if 'timeout_seconds' in credentials:
cls.QUERY_TIMEOUT = credentials['timeout_seconds']
Copy link
Member

Choose a reason for hiding this comment

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

don't mutate global state. a better way:

  • make poll_until_job_completes take a timeout as an argument
  • then call it with poll_until_job_completes(job, timeout=connection.get('credentials', {}).get('timeout_seconds'), cls.DEFAULT_QUERY_TIMEOUT)

Copy link
Member

Choose a reason for hiding this comment

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

(and remove this logic altogether)

query = client.run_sync_query(formatted_sql)
query.timeout_ms = cls.QUERY_TIMEOUT
query = client.run_sync_query(sql)
query.timeout_ms = cls.QUERY_TIMEOUT * 1000
Copy link
Member

Choose a reason for hiding this comment

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

query timeout override is not respected here

@drewbanin drewbanin merged commit 7a5670b into development Aug 29, 2017
@drewbanin drewbanin deleted the feature/bq-improvements branch August 29, 2017 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bigquery enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants