Skip to content

Commit

Permalink
chore: Simplify create_job slightly (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimfulton committed Aug 23, 2021
1 parent 2689df4 commit eed311e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions google/cloud/bigquery/client.py
Expand Up @@ -1935,11 +1935,10 @@ def create_job(
source_type=source_type,
)
elif "query" in job_config:
copy_config = copy.deepcopy(job_config)
query_job_config = google.cloud.bigquery.job.QueryJobConfig.from_api_repr(
copy_config
job_config
)
query = _get_sub_prop(copy_config, ["query", "query"])
query = _get_sub_prop(job_config, ["query", "query"])
return self.query(
query, job_config=query_job_config, retry=retry, timeout=timeout
)
Expand Down

0 comments on commit eed311e

Please sign in to comment.