Ibis BigQuery backend
Project description
This package provides a [BigQuery](https://cloud.google.com/bigquery) backend for [Ibis](https://ibis-project.org/).
Installation
Supported Python Versions
Python >= 3.7, < 3.10
Unsupported Python Versions
Python < 3.7
Install with conda:
conda install -c conda-forge ibis-bigquery
Install with pip:
pip install ibis-bigquery
Usage
Connecting to BigQuery
Recommended usage (Ibis 2.x, only [not yet released]):
import ibis
conn = ibis.bigquery.connect(
project_id=YOUR_PROJECT_ID,
dataset_id='bigquery-public-data.stackoverflow'
)
Using this library directly:
import ibis
import ibis_bigquery
conn = ibis_bigquery.connect(
project_id=YOUR_PROJECT_ID,
dataset_id='bigquery-public-data.stackoverflow'
)
Running a query
edu_table = conn.table(
'international_education',
database='bigquery-public-data.world_bank_intl_education')
edu_table = edu_table['value', 'year', 'country_code', 'indicator_code']
country_table = conn.table(
'country_code_iso',
database='bigquery-public-data.utility_us')
country_table = country_table['country_name', 'alpha_3_code']
expression = edu_table.join(
country_table,
[edu_table.country_code == country_table.alpha_3_code])
print(conn.execute(
expression[edu_table.year == 2016]
# Adult literacy rate.
[edu_table.indicator_code == 'SE.ADT.LITR.ZS']
.sort_by([ibis.desc(edu_table.value)])
.limit(20)
))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ibis-bigquery-1.0.0.tar.gz
(54.7 kB
view details)
Built Distribution
File details
Details for the file ibis-bigquery-1.0.0.tar.gz
.
File metadata
- Download URL: ibis-bigquery-1.0.0.tar.gz
- Upload date:
- Size: 54.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/0.0.0 importlib_metadata/4.2.0 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df266aaca37b2a0c8e5250ce051b43ee534f2fef0638bfcc3d15e68394bf9ae4 |
|
MD5 | c4f33607d31fc1bc3914821b5c5e7931 |
|
BLAKE2b-256 | bfb048579b952465003c30cf85bd385df50654eda6ae06171279caaf0f09e214 |
File details
Details for the file ibis_bigquery-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: ibis_bigquery-1.0.0-py3-none-any.whl
- Upload date:
- Size: 30.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/0.0.0 importlib_metadata/4.2.0 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8140eefb7ae44ce8743b172c1cef30156b35a975862524f02c7545d25b6d053b |
|
MD5 | bc5d00767defdf12f8dc40c401bea366 |
|
BLAKE2b-256 | cf16c60b11f7bd317205da1b6ddf8b5f895397b2d7d42163870d8829005b02de |