Skip to content

Commit d6820b9

Browse files
committed
Merge pull request #1280 from tseaver/1267-document_cloud_storage_uri_format
Document URI format for loading/extracting Cloud Storage objects.
2 parents 5e180f1 + da2f779 commit d6820b9

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

gcloud/bigquery/client.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,18 @@ def dataset(self, dataset_name):
105105
def load_table_from_storage(self, job_name, destination, *source_uris):
106106
"""Construct a job for loading data into a table from CloudStorage.
107107
108+
See:
109+
https://cloud.google.com/bigquery/docs/reference/v2/jobs#configuration.load
110+
108111
:type job_name: string
109112
:param job_name: Name of the job.
110113
111114
:type destination: :class:`gcloud.bigquery.table.Table`
112115
:param destination: Table into which data is to be loaded.
113116
114117
:type source_uris: sequence of string
115-
:param source_uris: URIs of data files to be loaded.
118+
:param source_uris: URIs of data files to be loaded; in format
119+
``gs://<bucket_name>/<object_name_or_glob>``.
116120
117121
:rtype: :class:`gcloud.bigquery.job.LoadTableFromStorageJob`
118122
:returns: a new ``LoadTableFromStorageJob`` instance
@@ -123,6 +127,9 @@ def load_table_from_storage(self, job_name, destination, *source_uris):
123127
def copy_table(self, job_name, destination, *sources):
124128
"""Construct a job for copying one or more tables into another table.
125129
130+
See:
131+
https://cloud.google.com/bigquery/docs/reference/v2/jobs#configuration.copy
132+
126133
:type job_name: string
127134
:param job_name: Name of the job.
128135
@@ -140,6 +147,9 @@ def copy_table(self, job_name, destination, *sources):
140147
def extract_table_to_storage(self, job_name, source, *destination_uris):
141148
"""Construct a job for extracting a table into Cloud Storage files.
142149
150+
See:
151+
https://cloud.google.com/bigquery/docs/reference/v2/jobs#configuration.extract
152+
143153
:type job_name: string
144154
:param job_name: Name of the job.
145155
@@ -148,7 +158,8 @@ def extract_table_to_storage(self, job_name, source, *destination_uris):
148158
149159
:type destination_uris: sequence of string
150160
:param destination_uris: URIs of CloudStorage file(s) into which
151-
table data is to be extracted.
161+
table data is to be extracted; in format
162+
``gs://<bucket_name>/<object_name_or_glob>``.
152163
153164
:rtype: :class:`gcloud.bigquery.job.ExtractTableToStorageJob`
154165
:returns: a new ``ExtractTableToStorageJob`` instance
@@ -159,6 +170,9 @@ def extract_table_to_storage(self, job_name, source, *destination_uris):
159170
def run_async_query(self, job_name, query):
160171
"""Construct a job for running a SQL query asynchronously.
161172
173+
See:
174+
https://cloud.google.com/bigquery/docs/reference/v2/jobs#configuration.query
175+
162176
:type job_name: string
163177
:param job_name: Name of the job.
164178

gcloud/bigquery/job.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,8 @@ class LoadTableFromStorageJob(_AsyncJob):
435435
:param destination: Table into which data is to be loaded.
436436
437437
:type source_uris: sequence of string
438-
:param source_uris: URIs of data files to be loaded.
438+
:param source_uris: URIs of one or more data files to be loaded, in
439+
format ``gs://<bucket_name>/<object_name_or_glob>``.
439440
440441
:type client: :class:`gcloud.bigquery.client.Client`
441442
:param client: A client which holds credentials and project configuration
@@ -736,7 +737,8 @@ class ExtractTableToStorageJob(_AsyncJob):
736737
737738
:type destination_uris: list of string
738739
:param destination_uris: URIs describing Cloud Storage blobs into which
739-
extracted data will be written.
740+
extracted data will be written, in format
741+
``gs://<bucket_name>/<object_name_or_glob>``.
740742
741743
:type client: :class:`gcloud.bigquery.client.Client`
742744
:param client: A client which holds credentials and project configuration

0 commit comments

Comments
 (0)