Skip to content

Commit

Permalink
Adding the dryRun option to the resource
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Moore <[email protected]>
  • Loading branch information
delfick committed May 30, 2016
1 parent d8735e1 commit 24d7775
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gcloud/bigquery/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class _SyncQueryConfiguration(object):
Values which are ``None`` -> server defaults.
"""
_default_dataset = None
_dry_run = None
_max_results = None
_timeout_ms = None
_preserve_nulls = None
Expand Down Expand Up @@ -207,6 +208,11 @@ def schema(self):
https://cloud.google.com/bigquery/docs/reference/v2/jobs/query#defaultDataset
"""

dry_run = _TypedProperty('dry_run', bool)
"""See:
https://cloud.google.com/bigquery/docs/reference/v2/jobs/query#dryRun
"""

max_results = _TypedProperty('max_results', six.integer_types)
"""See:
https://cloud.google.com/bigquery/docs/reference/v2/jobs/query#maxResults
Expand Down Expand Up @@ -258,6 +264,9 @@ def _build_resource(self):
if self.use_query_cache is not None:
resource['useQueryCache'] = self.use_query_cache

if self.dry_run is not None:
resource['dryRun'] = self.dry_run

return resource

def run(self, client=None):
Expand Down

0 comments on commit 24d7775

Please sign in to comment.