Skip to content

Commit

Permalink
docs: use timeout in create dataset sample (#52)
Browse files Browse the repository at this point in the history
* docs: use timeout in create dataset sample

* Emphasize "explicit" in comment timeout
  • Loading branch information
plamut committed Mar 9, 2020
1 parent 400673b commit 24f3910
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/create_dataset.py
Expand Up @@ -30,9 +30,9 @@ def create_dataset(dataset_id):
# TODO(developer): Specify the geographic location where the dataset should reside.
dataset.location = "US"

# Send the dataset to the API for creation.
# Send the dataset to the API for creation, with an explicit timeout.
# Raises google.api_core.exceptions.Conflict if the Dataset already
# exists within the project.
dataset = client.create_dataset(dataset) # Make an API request.
dataset = client.create_dataset(dataset, timeout=30) # Make an API request.
print("Created dataset {}.{}".format(client.project, dataset.dataset_id))
# [END bigquery_create_dataset]

0 comments on commit 24f3910

Please sign in to comment.