Skip to main content

An ADBC driver for working with BigQuery.

Project description

ADBC BigQuery Driver for Python

This package contains bindings for the BigQuery driver, using the driver manager to provide a DBAPI 2.0/PEP 249-compatible interface on top.

Building

Dependencies: a build of the BigQuery driver, and the adbc-driver-manager Python package. Optionally, install PyArrow to use the DBAPI 2.0-compatible interface.

Set the environment variable ADBC_BIGQUERY_LIBRARY to the path to libadbc_driver_bigquery.{dll,dylib,so} before running pip install.

# If not already installed
pip install -e ../adbc_driver_manager

export ADBC_BIGQUERY_LIBRARY=/path/to/libadbc_driver_bigquery.so
pip install --no-deps -e .

For users building from the arrow-adbc source repository, you can alternately use CMake to manage library dependencies and set environment variables for you. Assuming you specify -DADBC_DRIVER_BIGQUERY=ON you can also add -DADBC_BUILD_PYTHON=ON to define a python target.

For example, assuming you run cmake from the project root:

cmake -S c -B build --preset debug -DADBC_BUILD_PYTHON=ON -DADBC_DRIVER_BIGQUERY=ON
cmake --build build --target python

will properly build and install the Python library for you.

See CONTRIBUTING.md for details on the general build process.

Example

import adbc_driver_bigquery.dbapi
from adbc_driver_bigquery import DatabaseOptions

db_kwargs = {
    DatabaseOptions.AUTH_TYPE.value: DatabaseOptions.AUTH_VALUE_CREDENTIALS_FILE,
    DatabaseOptions.CREDENTIALS.value: "credentials.json",
    DatabaseOptions.PROJECT_ID.value: "bigquery-poc-418913",
    DatabaseOptions.DATASET_ID.value: "google_trends",
    DatabaseOptions.TABLE_ID.value: "small_top_terms",
}
with adbc_driver_bigquery.dbapi.connect(db_kwargs) as conn:
    with conn.cursor() as cur:
        cur.execute("SELECT 1")
        print(cur.fetch_arrow_table())

Testing

To run the tests, use pytest:

$ pytest -vvx

See CONTRIBUTING.md for details on the general test process.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adbc_driver_bigquery-1.11.0.tar.gz (19.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

adbc_driver_bigquery-1.11.0-py3-none-win_amd64.whl (17.7 MB view details)

Uploaded Python 3Windows x86-64

adbc_driver_bigquery-1.11.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (16.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

adbc_driver_bigquery-1.11.0-py3-none-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (18.0 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

adbc_driver_bigquery-1.11.0-py3-none-macosx_11_0_arm64.whl (9.0 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

adbc_driver_bigquery-1.11.0-py3-none-macosx_10_15_x86_64.whl (9.7 MB view details)

Uploaded Python 3macOS 10.15+ x86-64

File details

Details for the file adbc_driver_bigquery-1.11.0.tar.gz.

File metadata

  • Download URL: adbc_driver_bigquery-1.11.0.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for adbc_driver_bigquery-1.11.0.tar.gz
Algorithm Hash digest
SHA256 37fc2a90dfec1f741bc7475bdf50c744c22d05ec135d0858934117912c06077e
MD5 5b44a537bd6b122399b3a30d0a122427
BLAKE2b-256 5e0d3e7195500badfe3318d6409e3d7461354f7e3e57b3b8ee2cb5a4c0c78bbd

See more details on using hashes here.

File details

Details for the file adbc_driver_bigquery-1.11.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for adbc_driver_bigquery-1.11.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 75ff98aa9071707419c300f9da74e19da375cd6524ecf09493c8131960e31c3c
MD5 02e3669d84a693b2c6251c8f2d5ed5d1
BLAKE2b-256 f241595bdc39a6e8eea2be3ccd043a10e68243b8a682d45f52b5d982674269f3

See more details on using hashes here.

File details

Details for the file adbc_driver_bigquery-1.11.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for adbc_driver_bigquery-1.11.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 dea28d663b622e1b4c803fd063b0b959dc867218461ecb6e34b557423e956527
MD5 2cabee79724279ee1a6ab688b264cacb
BLAKE2b-256 742cf71aaea78f4859935e334b1c5791e959cb24315201789bb9f7a8fd5a94c2

See more details on using hashes here.

File details

Details for the file adbc_driver_bigquery-1.11.0-py3-none-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for adbc_driver_bigquery-1.11.0-py3-none-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3067b90ccbb6801936567bddcc56e79540efb7e09023f0300e9f6090cb7245e1
MD5 2db0ebbae7336f7ab343d46760528e11
BLAKE2b-256 9e0ace0b0772f479eb451993ed9a0d139fcdaddcab651d1ce09520003163aa54

See more details on using hashes here.

File details

Details for the file adbc_driver_bigquery-1.11.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for adbc_driver_bigquery-1.11.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 023744303c4900fc8e3d12cd044835d406ee8a84880458766aff0800601d4999
MD5 13f74bcded701844701b53269727fa0b
BLAKE2b-256 150bb88fd632ea5b26ded6f11cbfc62d154249b54d4ae95ad8bdc2e681f3cbb0

See more details on using hashes here.

File details

Details for the file adbc_driver_bigquery-1.11.0-py3-none-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for adbc_driver_bigquery-1.11.0-py3-none-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 4153bb759dcfa6c45420c4ee9a1505f3c5daa7685d10cf068a91b8876e183732
MD5 6cc7d274ad709c676dd7b0d287190e14
BLAKE2b-256 d60f76baf47962bfa49608fcd5d38c3a46213155aeb1f58e5c8abf467ed7e4bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page