@@ -772,7 +772,8 @@ def copy_table(self, sources, destination, job_id=None, job_config=None):
772772 job .begin ()
773773 return job
774774
775- def extract_table (self , source , * destination_uris , ** kwargs ):
775+ def extract_table (
776+ self , source , destination_uris , job_config = None , job_id = None ):
776777 """Start a job to extract a table into Cloud Storage files.
777778
778779 See
@@ -781,30 +782,32 @@ def extract_table(self, source, *destination_uris, **kwargs):
781782 :type source: :class:`google.cloud.bigquery.table.TableReference`
782783 :param source: table to be extracted.
783784
784- :type destination_uris: sequence of string
785+ :type destination_uris: One of:
786+ str or
787+ sequence of str
785788 :param destination_uris:
786789 URIs of Cloud Storage file(s) into which table data is to be
787790 extracted; in format ``gs://<bucket_name>/<object_name_or_glob>``.
788791
789792 :type kwargs: dict
790793 :param kwargs: Additional keyword arguments.
791794
792- :Keyword Arguments:
793- * *job_config*
794- (:class:`google.cloud.bigquery.job.ExtractJobConfig`) --
795- (Optional) Extra configuration options for the extract job.
796- * *job_id* (``str``) --
797- Additional content
798- (Optional) The ID of the job.
795+ :type job_id: str
796+ :param job_id: (Optional) The ID of the job.
797+
798+ :type job_config: :class:`google.cloud.bigquery.job.ExtractJobConfig`
799+ :param job_config: (Optional) Extra configuration options for the job.
799800
800801 :rtype: :class:`google.cloud.bigquery.job.ExtractJob`
801802 :returns: a new ``ExtractJob`` instance
802803 """
803- job_config = kwargs .get ('job_config' )
804- job_id = _make_job_id (kwargs .get ('job_id' ))
804+ job_id = _make_job_id (job_id )
805+
806+ if isinstance (destination_uris , six .string_types ):
807+ destination_uris = [destination_uris ]
805808
806809 job = ExtractJob (
807- job_id , source , list ( destination_uris ) , client = self ,
810+ job_id , source , destination_uris , client = self ,
808811 job_config = job_config )
809812 job .begin ()
810813 return job
0 commit comments