1
1
.. include :: /../bigquery/README.rst
2
2
3
3
Using the Library
4
- =================
4
+ -----------------
5
5
6
6
Projects
7
- --------
7
+ ~~~~~~~~
8
8
9
9
A project is the top-level container in the ``BigQuery `` API: it is tied
10
10
closely to billing, and can provide default access control across all its
@@ -23,15 +23,15 @@ To override the project inferred from the environment, pass an explicit
23
23
24
24
25
25
Project ACLs
26
- ~~~~~~~~~~~~
26
+ ^^^^^^^^^^^^
27
27
28
28
Each project has an access control list granting reader / writer / owner
29
29
permission to one or more entities. This list cannot be queried or set
30
30
via the API; it must be managed using the Google Developer Console.
31
31
32
32
33
33
Datasets
34
- --------
34
+ ~~~~~~~~
35
35
36
36
A dataset represents a collection of tables, and applies several default
37
37
policies to tables as they are created:
@@ -47,7 +47,7 @@ See BigQuery documentation for more information on
47
47
48
48
49
49
Dataset operations
50
- ~~~~~~~~~~~~~~~~~~
50
+ ^^^^^^^^^^^^^^^^^^
51
51
52
52
List datasets for the client's project:
53
53
@@ -99,13 +99,13 @@ Delete a dataset:
99
99
100
100
101
101
Tables
102
- ------
102
+ ~~~~~~
103
103
104
104
Tables exist within datasets. See BigQuery documentation for more information
105
105
on `Tables <https://cloud.google.com/bigquery/docs/tables >`_.
106
106
107
107
Table operations
108
- ~~~~~~~~~~~~~~~~
108
+ ^^^^^^^^^^^^^^^^
109
109
List tables for the dataset:
110
110
111
111
.. literalinclude :: snippets.py
@@ -187,7 +187,7 @@ Upload table data from a file:
187
187
:end-before: [END bigquery_load_from_file]
188
188
189
189
Load table data from Google Cloud Storage
190
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
190
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
191
191
192
192
See also: `Loading JSON data from Cloud Storage
193
193
<https://cloud.google.com/bigquery/docs/loading-data-cloud-storage-json> `_.
@@ -217,7 +217,7 @@ Load a Parquet file from Cloud Storage:
217
217
:end-before: [END bigquery_load_table_gcs_parquet]
218
218
219
219
Customer Managed Encryption Keys
220
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
220
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
221
221
222
222
Table data is always encrypted at rest, but BigQuery also provides a way for
223
223
you to control what keys it uses to encrypt they data. See `Protecting data
@@ -270,11 +270,11 @@ Cloud KMS for the destination table.
270
270
:end-before: [END bigquery_query_destination_table_cmek]
271
271
272
272
Queries
273
- -------
273
+ ~~~~~~~
274
274
275
275
276
276
Querying data
277
- ~~~~~~~~~~~~~
277
+ ^^^^^^^^^^^^^
278
278
279
279
Run a query and wait for it to finish:
280
280
@@ -286,7 +286,7 @@ Run a query and wait for it to finish:
286
286
287
287
288
288
Run a dry run query
289
- ~~~~~~~~~~~~~~~~~~~
289
+ ^^^^^^^^^^^^^^^^^^^
290
290
291
291
.. literalinclude :: snippets.py
292
292
:language: python
@@ -296,7 +296,7 @@ Run a dry run query
296
296
297
297
298
298
Writing query results to a destination table
299
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
299
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
300
300
301
301
See BigQuery documentation for more information on
302
302
`writing query results <https://cloud.google.com/bigquery/docs/writing-results >`_.
@@ -309,7 +309,7 @@ See BigQuery documentation for more information on
309
309
310
310
311
311
Run a query using a named query parameter
312
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
312
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
313
313
314
314
See BigQuery documentation for more information on
315
315
`parameterized queries <https://cloud.google.com/bigquery/docs/parameterized-queries >`_.
@@ -322,10 +322,10 @@ See BigQuery documentation for more information on
322
322
323
323
324
324
Jobs
325
- ----
325
+ ~~~~
326
326
327
327
List jobs for a project
328
- ~~~~~~~~~~~~~~~~~~~~~~~
328
+ ^^^^^^^^^^^^^^^^^^^^^^^
329
329
330
330
Jobs describe actions performed on data in BigQuery tables:
331
331
@@ -342,10 +342,10 @@ Jobs describe actions performed on data in BigQuery tables:
342
342
343
343
344
344
Using BigQuery with Pandas
345
- --------------------------
345
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
346
346
347
347
Retrieve BigQuery data as a Pandas DataFrame
348
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
348
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
349
349
350
350
As of version 0.29.0, you can use the
351
351
:func: `~google.cloud.bigquery.table.RowIterator.to_dataframe ` function to
@@ -381,7 +381,7 @@ To retrieve table rows as a :class:`pandas.DataFrame`:
381
381
:end-before: [END bigquery_list_rows_dataframe]
382
382
383
383
Load a Pandas DataFrame to a BigQuery Table
384
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
384
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
385
385
386
386
As of version 1.3.0, you can use the
387
387
:func: `~google.cloud.bigquery.client.Client.load_table_from_dataframe ` function
@@ -405,7 +405,7 @@ and load it into a new table:
405
405
:end-before: [END bigquery_load_table_dataframe]
406
406
407
407
API Reference
408
- =============
408
+ -------------
409
409
410
410
.. toctree ::
411
411
:maxdepth: 2
@@ -414,7 +414,7 @@ API Reference
414
414
dbapi
415
415
416
416
Changelog
417
- =========
417
+ ---------
418
418
419
419
For a list of all ``google-cloud-bigquery `` releases:
420
420
0 commit comments