def run_with_configuration(self, configuration):
jobs = self.service.jobs()<EOL>job_data = {'<STR_LIT>': configuration}<EOL>query_reply = jobs.insert(projectId=self.project_id, body=job_data).execute(num_retries=self.num_retries)<EOL>self.running_job_id = query_reply['<STR_LIT>']['<STR_LIT>']<EOL>if '<STR_LIT:location>' in query_reply['<STR_LIT>']:<EOL><INDENT>location = query_reply['<STR_LIT>']['<STR_LIT:location>']<EOL><DEDENT>else:<EOL><INDENT>location = self.location<EOL><DEDENT>keep_polling_job = True<EOL>while keep_polling_job:<EOL><INDENT>try:<EOL><INDENT>if location:<EOL><INDENT>job = jobs.get(<EOL>projectId=self.project_id,<EOL>jobId=self.running_job_id,<EOL>location=location).execute(num_retries=self.num_retries)<EOL><DEDENT>else:<EOL><INDENT>job = jobs.get(<EOL>projectId=self.project_id,<EOL>jobId=self.running_job_id).execute(num_retries=self.num_retries)<EOL><DEDENT>if job['<STR_LIT:status>']['<STR_LIT:state>'] == '<STR_LIT>':<EOL><INDENT>keep_polling_job = False<EOL>if '<STR_LIT>' in job['<STR_LIT:status>']:<EOL><INDENT>raise Exception(<EOL>'<STR_LIT>'.<EOL>format(job['<STR_LIT:status>']['<STR_LIT>'], job))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.log.info('<STR_LIT>',<EOL>self.project_id, self.running_job_id)<EOL>time.sleep(<NUM_LIT:5>)<EOL><DEDENT><DEDENT>except HttpError as err:<EOL><INDENT>if err.resp.status in [<NUM_LIT>, <NUM_LIT>]:<EOL><INDENT>self.log.info(<EOL>'<STR_LIT>',<EOL>err.resp.status, self.running_job_id)<EOL>time.sleep(<NUM_LIT:5>)<EOL><DEDENT>else:<EOL><INDENT>raise Exception(<EOL>'<STR_LIT>'.<EOL>format(err.resp.status))<EOL><DEDENT><DEDENT><DEDENT>return self.running_job_id<EOL>
Executes a BigQuery SQL query. See here:

https://cloud.google.com/bigquery/docs/reference/v2/jobs

For more details about the configuration parameter.

:param configuration: The configuration parameter maps directly to
    BigQuery's configuration field in the job object. See
    https://cloud.google.com/bigquery/docs/reference/v2/jobs for
    details.