@@ -832,7 +832,9 @@ def copy_table(self, sources, destination, job_id=None, job_config=None,
832832 job .begin (retry = retry )
833833 return job
834834
835- def extract_table (self , source , * destination_uris , ** kwargs ):
835+ def extract_table (
836+ self , source , destination_uris , job_config = None , job_id = None ,
837+ retry = DEFAULT_RETRY ):
836838 """Start a job to extract a table into Cloud Storage files.
837839
838840 See
@@ -841,33 +843,35 @@ def extract_table(self, source, *destination_uris, **kwargs):
841843 :type source: :class:`google.cloud.bigquery.table.TableReference`
842844 :param source: table to be extracted.
843845
844- :type destination_uris: sequence of string
846+ :type destination_uris: One of:
847+ str or
848+ sequence of str
845849 :param destination_uris:
846850 URIs of Cloud Storage file(s) into which table data is to be
847851 extracted; in format ``gs://<bucket_name>/<object_name_or_glob>``.
848852
849853 :type kwargs: dict
850854 :param kwargs: Additional keyword arguments.
851855
852- :Keyword Arguments:
853- * *job_config*
854- (:class:`google.cloud.bigquery.job.ExtractJobConfig`) --
855- (Optional) Extra configuration options for the extract job.
856- * *job_id* (``str``) --
857- Additional content
858- (Optional) The ID of the job.
859- * *retry* (:class:`google.api.core.retry.Retry`)
860- (Optional) How to retry the RPC.
856+ :type job_id: str
857+ :param job_id: (Optional) The ID of the job.
858+
859+ :type job_config: :class:`google.cloud.bigquery.job.ExtractJobConfig`
860+ :param job_config: (Optional) Extra configuration options for the job.
861+
862+ :type retry: :class:`google.api.core.retry.Retry`
863+ :param retry: (Optional) How to retry the RPC.
861864
862865 :rtype: :class:`google.cloud.bigquery.job.ExtractJob`
863866 :returns: a new ``ExtractJob`` instance
864867 """
865- job_config = kwargs .get ('job_config' )
866- job_id = _make_job_id (kwargs .get ('job_id' ))
867- retry = kwargs .get ('retry' , DEFAULT_RETRY )
868+ job_id = _make_job_id (job_id )
869+
870+ if isinstance (destination_uris , six .string_types ):
871+ destination_uris = [destination_uris ]
868872
869873 job = ExtractJob (
870- job_id , source , list ( destination_uris ) , client = self ,
874+ job_id , source , destination_uris , client = self ,
871875 job_config = job_config )
872876 job .begin (retry = retry )
873877 return job
0 commit comments