Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a5b3bd8

Browse filesBrowse files
committed
Fixed doc strings
1 parent b714c50 commit a5b3bd8
Copy full SHA for a5b3bd8

File tree

Expand file treeCollapse file tree

3 files changed

+31
-18
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+31
-18
lines changed

‎bigquery/samples/export_data_to_cloud_storage.py

Copy file name to clipboardExpand all lines: bigquery/samples/export_data_to_cloud_storage.py
+10-6Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@ def export_table(service, cloud_storage_path,
2222
projectId, datasetId, tableId,
2323
num_retries=5):
2424
"""
25-
service: initialized and authorized bigquery
26-
google-api-client object,
27-
cloud_storage_path: fully qualified
28-
path to a Google Cloud Storage location,
29-
e.g. gs://mybucket/myfolder/
30-
returns: an extract job resource representing the
25+
Starts an export job
26+
27+
Args:
28+
service: initialized and authorized bigquery
29+
google-api-client object,
30+
cloud_storage_path: fully qualified
31+
path to a Google Cloud Storage location,
32+
e.g. gs://mybucket/myfolder/
33+
34+
Returns: an extract job resource representing the
3135
job, see https://cloud.google.com/bigquery/docs/reference/v2/jobs
3236
"""
3337
# Generate a unique job_id so retries

‎bigquery/samples/load_data_by_post.py

Copy file name to clipboardExpand all lines: bigquery/samples/load_data_by_post.py
+10-5Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,16 @@
2323
# [START make_post]
2424
def make_post(http, schema, data, projectId, datasetId, tableId):
2525
"""
26-
http: an authorized httplib2 client,
27-
schema: a valid bigquery schema,
28-
see https://cloud.google.com/bigquery/docs/reference/v2/tables,
29-
data: valid JSON to insert into the table
30-
returns: an http.request object
26+
Creates an http POST request for loading data into
27+
a bigquery table
28+
29+
Args:
30+
http: an authorized httplib2 client,
31+
schema: a valid bigquery schema,
32+
see https://cloud.google.com/bigquery/docs/reference/v2/tables,
33+
data: valid JSON to insert into the table
34+
35+
Returns: an http.request object
3136
"""
3237
url = ('https://www.googleapis.com/upload/bigquery/v2/projects/' +
3338
projectId + '/jobs')

‎bigquery/samples/load_data_from_csv.py

Copy file name to clipboardExpand all lines: bigquery/samples/load_data_from_csv.py
+11-7Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@
2121
def load_table(service, source_schema, source_csv,
2222
projectId, datasetId, tableId, num_retries=5):
2323
"""
24-
service: an initialized and authorized bigquery
25-
google-api-client object
26-
source_schema: a valid bigquery schema,
27-
see https://cloud.google.com/bigquery/docs/reference/v2/tables
28-
source_csv: the fully qualified Google Cloud Storage location of
29-
the data to load into your table
30-
returns: a bigquery load job, see
24+
Starts a job to load a bigquery table from CSV
25+
26+
Args:
27+
service: an initialized and authorized bigquery
28+
google-api-client object
29+
source_schema: a valid bigquery schema,
30+
see https://cloud.google.com/bigquery/docs/reference/v2/tables
31+
source_csv: the fully qualified Google Cloud Storage location of
32+
the data to load into your table
33+
34+
Returns: a bigquery load job, see
3135
https://cloud.google.com/bigquery/docs/reference/v2/jobs#configuration.load
3236
"""
3337

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.