title: Cannot set destination table in jobs with DML statements in BigQuery
body: <p>I am working on Python code to execute BigQuery sql command using bigquery.Client.query. I am getting <strong>Cannot set destination table in jobs with DML statements</strong> exception.</p>
  
  <p>Below is the Python code I am using</p>
  
  <pre><code>if query_file_name:
      with open(query_file_name, mode="r") as query_file:
          query = query_file.read()
  
  job_config = bigquery.QueryJobConfig()
  job_config.use_legacy_sql = use_legacy_sql
  
  if destination:
      if destination.partitioned_field:
          job_config.time_partitioning = TimePartitioning(type_=TimePartitioningType.DAY, 
                                           field=destination.partitioned_field)
  google_bq_table = self.fetch_table_reference(destination)
  job_config.destination = google_bq_table
  
  job_config.write_disposition = WriteDisposition.WRITE_APPEND
  
  query_job = self.google_client.query(query, job_config=job_config)  # API request - starts the query asynchronously
  </code></pre>
  
  <p>I have query_file as in below BigQuery sql</p>
  
  <pre><code>INSERT mydataset.target_table
          (col1, col2, col3, created_date)
  WITH T AS (SELECT col1, col2, col3, CURRENT_DATE() as created_date
              from mydataset.temp_table
             )
  SELECT col1, col2, col3, created_date FROM T
  </code></pre>
  
  <p>Appreciate your help in advance</p>
  
  <p>Thanks,</p>
  
  <p>Raghunath.</p>