File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ class _SyncQueryConfiguration(object):
2929 Values which are ``None`` -> server defaults.
3030 """
3131 _default_dataset = None
32+ _dry_run = None
3233 _max_results = None
3334 _timeout_ms = None
3435 _preserve_nulls = None
@@ -207,6 +208,11 @@ def schema(self):
207208 https://cloud.google.com/bigquery/docs/reference/v2/jobs/query#defaultDataset
208209 """
209210
211+ dry_run = _TypedProperty ('dry_run' , bool )
212+ """See:
213+ https://cloud.google.com/bigquery/docs/reference/v2/jobs/query#dryRun
214+ """
215+
210216 max_results = _TypedProperty ('max_results' , six .integer_types )
211217 """See:
212218 https://cloud.google.com/bigquery/docs/reference/v2/jobs/query#maxResults
@@ -258,6 +264,9 @@ def _build_resource(self):
258264 if self .use_query_cache is not None :
259265 resource ['useQueryCache' ] = self .use_query_cache
260266
267+ if self .dry_run is not None :
268+ resource ['dryRun' ] = self .dry_run
269+
261270 return resource
262271
263272 def run (self , client = None ):
Original file line number Diff line number Diff line change @@ -206,6 +206,7 @@ def test_run_w_alternate_client(self):
206206 query .preserve_nulls = True
207207 query .timeout_ms = 20000
208208 query .use_query_cache = False
209+ query .dry_run = True
209210
210211 query .run (client = client2 )
211212
@@ -220,6 +221,7 @@ def test_run_w_alternate_client(self):
220221 'projectId' : self .PROJECT ,
221222 'datasetId' : DATASET ,
222223 },
224+ 'dryRun' : True ,
223225 'maxResults' : 100 ,
224226 'preserveNulls' : True ,
225227 'timeoutMs' : 20000 ,
You can’t perform that action at this time.
0 commit comments