From 9c3409bb06218bf499620544f8e92802df0cce47 Mon Sep 17 00:00:00 2001 From: HemangChothani <50404902+HemangChothani@users.noreply.github.com> Date: Mon, 20 Jul 2020 19:20:00 +0530 Subject: [PATCH] docs(bigquery): add docstring for conflict exception (#171) * docs(bigquery): add docstring for conflict exception * docs(bigquery): nit --- google/cloud/bigquery/client.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/google/cloud/bigquery/client.py b/google/cloud/bigquery/client.py index 20a485698..a3d1b8846 100644 --- a/google/cloud/bigquery/client.py +++ b/google/cloud/bigquery/client.py @@ -441,6 +441,10 @@ def create_dataset( google.cloud.bigquery.dataset.Dataset: A new ``Dataset`` returned from the API. + Raises: + google.cloud.exceptions.Conflict: + If the dataset already exists. + Example: >>> from google.cloud import bigquery @@ -496,6 +500,10 @@ def create_routine( Returns: google.cloud.bigquery.routine.Routine: A new ``Routine`` returned from the service. + + Raises: + google.cloud.exceptions.Conflict: + If the routine already exists. """ reference = routine.reference path = "/projects/{}/datasets/{}/routines".format( @@ -540,6 +548,10 @@ def create_table(self, table, exists_ok=False, retry=DEFAULT_RETRY, timeout=None Returns: google.cloud.bigquery.table.Table: A new ``Table`` returned from the service. + + Raises: + google.cloud.exceptions.Conflict: + If the table already exists. """ table = _table_arg_to_table(table, default_project=self.project)