Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 40 additions & 9 deletions go/docs/bigquery.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,50 @@
{{ cross_reference|safe }}
# Google BigQuery Driver {{ version }}

{{ heading|safe }}

:::{note}
This project is not associated with Google.
:::

{{ version_header|safe }}

This driver provides access to [Google BigQuery][bigquery], a data warehouse
offered by Google Cloud.

## Installation & Quickstart
## Installation

The BigQuery driver can be installed with [dbc](https://docs.columnar.tech/dbc):

```bash
dbc install bigquery
```

## Pre-requisites

Using the BigQuery driver requires some setup before you can connect:

The driver can be installed with `dbc`.
1. Create a [Google Cloud account](http://console.cloud.google.com)
1. Install the [Google Cloud CLI](https://cloud.google.com/cli) (for managing credentials)
1. Authenticate with Google Cloud
- Run `gcloud auth application-default login`
1. Create, find, or reuse a project and dataset (record these for later)

To use the driver:
## Connecting

1. Authenticate with Google Cloud (e.g. via `gcloud auth application-default
login`).
1. Provide the database options `adbc.bigquery.sql.project_id` and
`adbc.bigquery.sql.dataset_id`.
To connect, replace `my-gcp-project` and `my-gcp-dataset` below with the appropriate values for your situation and run the following:

```python
from adbc_driver_manager import dbapi

conn = dbapi.connect(
driver="bigquery",
db_kwargs={
"adbc.bigquery.sql.project_id": "my-gcp-project",
"adbc.bigquery.sql.dataset_id": "my-gcp-datase"
}
)
```

Note: The example above is for Python using the [adbc-driver-manager](https://pypi.org/project/adbc-driver-manager) package but the process will be similar for other driver managers.

## Feature & Type Support

Expand All @@ -46,6 +71,12 @@ To use the driver:

{{ types|safe }}

## Previous Versions

To see documentation for previous versions of this driver, see the following:

- [v0.1.1](./v0.1.1.md)

{{ footnotes|safe }}

[bigquery]: https://cloud.google.com/bigquery/
2 changes: 1 addition & 1 deletion go/validation/tests/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class BigQueryQuirks(model.DriverQuirks):
# BigQuery doesn't really have a public facing version, so use the client
# version instead
vendor_version = "cloud.google.com/go/bigquery v1.72.0"
short_version = "gcloud"
short_version = "1.72.0"
features = model.DriverFeatures(
connection_get_table_schema=True,
# TODO(lidavidm): this is a bit weird; it does work, but we'd need two
Expand Down
Loading