Skip to main content

Python wrapper for interacting Google BigQuery.

Project description

CI pipeline status PyPI PyPI - Python Version codecov Checked with mypy Code style: black

GBQ

Python wrapper for interacting Google BigQuery.

This package provides an interface by wrapping Google's low level library. It exposes options to provide input as json objects which can be used for various CI/CD tools.

Usage

Basic Usage

from gbq import BigQuery

# BigQuery project id as listed in the Google Developers Console.
project_id = 'project_id'

# BigQuery dataset id as listed in the Google Developers Console.
dataset_id = 'dataset_id'

# BigQuery table/view id as listed in the Google Developers Console.
structure_id = 'structure_id'

# BigQuery structure definition as defined in the Google Developers Console.
json_schema = {"type": "table", "schema": [{"id": "integer"}]}

# Service account email address as listed in the Google Developers Console.
svc_account = '{"type": "service_account",   "project_id": "project_id"}'

bq = BigQuery(svc_account=svc_account, project=project_id)

bq.create_or_update_structure(project_id, dataset_id, structure_id, json_schema)

Documentation

Check out the project documentation

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

gbq-0.1.5.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

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

gbq-0.1.5-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file gbq-0.1.5.tar.gz.

File metadata

  • Download URL: gbq-0.1.5.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for gbq-0.1.5.tar.gz
Algorithm Hash digest
SHA256 cb842918d9a04776d6fdbdf83a8e90c24452a560706c44df721e00d59be544b0
MD5 e1214706de74d1aa32b53544a85636f7
BLAKE2b-256 19743e7c2775db953d119f9445774b4cdd339dcf6ae333fa0940732968f1e978

See more details on using hashes here.

File details

Details for the file gbq-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: gbq-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for gbq-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9e1b9c9aa7ac7ea6033fdab5780f29facb1920779244f4f75d9b73b2a4ade208
MD5 5e97616880aa6fbeb47d8dfee469896d
BLAKE2b-256 3c4f7570e3d103f9a789bde3fed4aab41a9e990690cbdf8d0f94f242d77844cb

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