Skip to content

Commit

Permalink
chore: two fixit fixes (#2050)
Browse files Browse the repository at this point in the history
  • Loading branch information
leahecole authored Nov 1, 2024
1 parent 7b03d61 commit fef8b88
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions google/cloud/bigquery/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,15 @@ def get_service_account_email(
) -> str:
"""Get the email address of the project's BigQuery service account
Example:
.. code-block:: python
from google.cloud import bigquery
client = bigquery.Client()
client.get_service_account_email()
# returns an email similar to: my_service_account@my-project.iam.gserviceaccount.com
Note:
This is the service account that BigQuery uses to manage tables
encrypted by a key in KMS.
Expand All @@ -345,13 +354,6 @@ def get_service_account_email(
str:
service account email address
Example:
>>> from google.cloud import bigquery
>>> client = bigquery.Client()
>>> client.get_service_account_email()
my_service_account@my-project.iam.gserviceaccount.com
"""
if project is None:
project = self.project
Expand Down Expand Up @@ -629,9 +631,19 @@ def create_dataset(
) -> Dataset:
"""API call: create the dataset via a POST request.
See
https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets/insert
Example:
.. code-block:: python
from google.cloud import bigquery
client = bigquery.Client()
dataset = bigquery.Dataset('my_project.my_dataset')
dataset = client.create_dataset(dataset)
Args:
dataset (Union[ \
google.cloud.bigquery.dataset.Dataset, \
Expand All @@ -658,14 +670,6 @@ def create_dataset(
Raises:
google.cloud.exceptions.Conflict:
If the dataset already exists.
Example:
>>> from google.cloud import bigquery
>>> client = bigquery.Client()
>>> dataset = bigquery.Dataset('my_project.my_dataset')
>>> dataset = client.create_dataset(dataset)
"""
dataset = self._dataset_from_arg(dataset)
if isinstance(dataset, DatasetReference):
Expand Down

0 comments on commit fef8b88

Please sign in to comment.