Skip to content

Commit

Permalink
Move 'more examples' to bottom of the examples section.
Browse files Browse the repository at this point in the history
Add section headers to Dataset how-to guides.
  • Loading branch information
tswast committed Oct 18, 2018
1 parent 277aab1 commit af8a662
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 19 deletions.
33 changes: 22 additions & 11 deletions bigquery/docs/howto/datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ policies to tables as they are created:
See BigQuery documentation for more information on
`Datasets <https://cloud.google.com/bigquery/docs/datasets>`_.


Dataset operations
^^^^^^^^^^^^^^^^^^
Listing Datasets
^^^^^^^^^^^^^^^^

List datasets for a project with the
:func:`~google.cloud.bigquery.client.Client.list_datasets` method:
Expand All @@ -26,14 +25,8 @@ List datasets for a project with the
:start-after: [START bigquery_list_datasets]
:end-before: [END bigquery_list_datasets]

Create a new dataset with the
:func:`~google.cloud.bigquery.client.Client.create_dataset` method:

.. literalinclude:: ../snippets.py
:language: python
:dedent: 4
:start-after: [START bigquery_create_dataset]
:end-before: [END bigquery_create_dataset]
Getting a Dataset
^^^^^^^^^^^^^^^^^

Get a dataset resource (to pick up changes made by another client) with the
:func:`~google.cloud.bigquery.client.Client.get_dataset` method:
Expand All @@ -44,6 +37,21 @@ Get a dataset resource (to pick up changes made by another client) with the
:start-after: [START bigquery_get_dataset]
:end-before: [END bigquery_get_dataset]

Creating a Dataset
^^^^^^^^^^^^^^^^^^

Create a new dataset with the
:func:`~google.cloud.bigquery.client.Client.create_dataset` method:

.. literalinclude:: ../snippets.py
:language: python
:dedent: 4
:start-after: [START bigquery_create_dataset]
:end-before: [END bigquery_create_dataset]

Updating a Dataset
^^^^^^^^^^^^^^^^^^

Update a property in a dataset's metadata with the
:func:`~google.cloud.bigquery.client.Client.update_dataset` method:

Expand All @@ -62,6 +70,9 @@ Modify user permissions on a dataset with the
:start-after: [START bigquery_update_dataset_access]
:end-before: [END bigquery_update_dataset_access]

Deleting a Dataset
^^^^^^^^^^^^^^^^^^

Delete a dataset with the
:func:`~google.cloud.bigquery.client.Client.delete_dataset` method:

Expand Down
16 changes: 8 additions & 8 deletions bigquery/docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
.. include:: /../bigquery/README.rst

More Examples
-------------

These guides cover how to use the ``google-cloud-bigquery`` library to use
the Google BigQuery API. See the `official Google BigQuery how-to guides
<https://cloud.google.com/bigquery/docs/how-to>`_ for more in-depth
information and code samples.

BigQuery Basics
~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -39,6 +31,14 @@ Integrations with Other Libraries
See also, the :mod:`google.cloud.bigquery.magics` module for integrations
with Jupyter.

More Examples
~~~~~~~~~~~~~

See the `official Google BigQuery how-to guides
<https://cloud.google.com/bigquery/docs/how-to>`_ for more in-depth
information and code samples on using the ``google-cloud-bigquery`` library
with the BigQuery API.

API Reference
-------------

Expand Down

0 comments on commit af8a662

Please sign in to comment.