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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ibis-bigquery-0.1.0.tar.gz.
File metadata
- Download URL: ibis-bigquery-0.1.0.tar.gz
- Upload date:
- Size: 43.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0aa1413c5315202419e7d79e1b0c03c39fde9df693f810402d57eb3e418cba80
|
|
| MD5 |
81f373036d1acb5901c8ac0147d7915d
|
|
| BLAKE2b-256 |
83e7ea71b848e0dab8e5016018fbf3214dffd2b4a7364e19d59d04f4d32642fa
|
File details
Details for the file ibis_bigquery-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ibis_bigquery-0.1.0-py3-none-any.whl
- Upload date:
- Size: 30.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3a2c9c0f0ac9ca9f02ad03c4208c534283cc3055d77ff240fbdce18e1ad69aa
|
|
| MD5 |
6d2bf18b96c57dcf391c7ab63bc502bc
|
|
| BLAKE2b-256 |
0b8b7ec18235de8ba83de395c992bf0930df3ec21a83e07e8d00842ec91bc809
|