docs: def write_to_table(
              self,
              query,
              dataset=None,
              table=None,            
              external_udf_uris=None,
              allow_large_results=None,
              use_query_cache=None,
              priority=None,
              create_disposition=None,
              write_disposition=None,
              use_legacy_sql=None,
              maximum_billing_tier=None,
              flatten=None,
              project_id=None,
      ):
          """
          Write query result to table. If dataset or table is not provided,
          Bigquery will write the result to temporary table. Optional arguments
          that are not specified are determined by BigQuery as described:
          https://developers.google.com/bigquery/docs/reference/v2/jobs
  
          Parameters
          ----------
          query : str
              BigQuery query string
          dataset : str, optional
              String id of the dataset
          table : str, optional
              String id of the table        
          external_udf_uris : list, optional
              Contains external UDF URIs. If given, URIs must be Google Cloud
              Storage and have .js extensions.
          allow_large_results : bool, optional
              Whether or not to allow large results
          use_query_cache : bool, optional
              Whether or not to use query cache
          priority : str, optional
              One of the JOB_PRIORITY_* constants
          create_disposition : str, optional
              One of the JOB_CREATE_* constants
          write_disposition : str, optional
              One of the JOB_WRITE_* constants
          use_legacy_sql: bool, optional
              If False, the query will use BigQuery's standard SQL
              (https://cloud.google.com/bigquery/sql-reference/)
          maximum_billing_tier : integer, optional
              Limits the billing tier for this job. Queries that have resource
              usage beyond this tier will fail (without incurring a charge). If
              unspecified, this will be set to your project default. For more
              information,
              see https://cloud.google.com/bigquery/pricing#high-compute
          flatten : bool, optional
              Whether or not to flatten nested and repeated fields
              in query results
          project_id: str, optional
              String id of the project
  
          Returns
          -------
          dict
              A BigQuery job resource
  
          Raises
          ------
          JobInsertException
              On http/auth failures or error in result
          """
  
          configuration = {
              "query": query,
          }
  
          project_id = self._get_project_id(project_id)
  
          if dataset and table:
              configuration['destinationTable'] = {
                  "projectId": project_id,
                  "tableId": table,
                  "datasetId": dataset
              }
  
          if allow_large_results is not None:
              configuration['allowLargeResults'] = allow_large_results
  
          if flatten is not None:
              configuration['flattenResults'] = flatten
  
          if maximum_billing_tier is not None:
              configuration['maximumBillingTier'] = maximum_billing_tier
  
          if use_query_cache is not None:
              configuration['useQueryCache'] = use_query_cache
  
          if use_legacy_sql is not None:
              configuration['useLegacySql'] = use_legacy_sql
  
          if priority:
              configuration['priority'] = priority
  
          if create_disposition:
              configuration['createDisposition'] = create_disposition
  
          if write_disposition:
              configuration['writeDisposition'] = write_disposition
  
          if external_udf_uris:
              configuration['userDefinedFunctionResources'] = \
                  [ {'resourceUri': u} for u in external_udf_uris ]
  
          body = {
              "configuration": {
                  'query': configuration
              }
          }
  
          logger.info("Creating write to table job %s" % body)
          job_resource = self._insert_job(body)
          self._raise_insert_exception_if_error(job_resource)
          return job_resource