BigQuery Ingest Utils
This package contains helper utilities to make it easier to ingest data into BigQuery. The main functionality is to help ingest data from local dataframes or files. The main assumption of this package is that your data can be loaded into a polars dataframe and uploaded from there into bigquery, either directly or via cloud storage.
Note: This package is biased towards certain data structures and file configurations, at the benefit of saved time to get something working.
Local Development
To use the package locally, authenticate with GCP using OAuth:
gcloud auth application-default login
gcloud config set project YOUR_PROJECT_ID
Setup environment for local development:
conda create -n bigquery_etl_tools pip
conda activate bigquery_etl_tools
pip install -r requirements.txt
Optionally, install ipykernel if developing in jupyter notebooks:
pip install ipykernel
Testing
The tests for this package are created using pytest, for some of the tests you will need to specifiy variables which are specfic to your GCP environment. To do that create a .env file in the root of the repository and set the following values:
BUCKET='bucketname'
DATASET='datasetname'
To run pytest run the following command on the command line:
pytest # full run
pytest tests/MODULE_NAME.py # module run
Build the Package
See the package here: https://pypi.org/project/bigquery-etl-tools/
To build the package using twine run the following on the command line in the root directory:
python setup.py sdist bdist_wheel # build the distribution
twine check dist/* # check everything has built correctly
twine upload dist/* # upload to pypi
To install the package into an environment run:
pip install bigquery-etl-tools
@TODO turn this into github action
Examples
See notebook.ipynb for example use cases.
Metadata
Release files for bigquery-etl-tools 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bigquery_etl_tools-0.0.4.tar.gz | 8.5 kB | Without provenance | Details for bigquery_etl_tools-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bigquery_etl_tools-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for bigquery_etl_tools-0.0.4-py3-none-any.whl |
Total release size: 20.4 kB
Release files / bigquery_etl_tools-0.0.4.tar.gz
| Download URL | bigquery_etl_tools-0.0.4.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec7628c6960722fa7030afcc56324464e1a700173c5e494bb7c5ad81fb2e86f6
|
|
BLAKE2b-256 checksum How to use checksums |
79c0d87216a648a0dc8ee399d3638d13165a94fc5f15a39b29aee6d437f52861
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.13.0
|
Release files / bigquery_etl_tools-0.0.4-py3-none-any.whl
| Download URL | bigquery_etl_tools-0.0.4-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c8dc9c887d4b4ae435c82ee7166bd5fb19890225d35ccb542d198512d7d138b
|
|
BLAKE2b-256 checksum How to use checksums |
d18451a4798476b2c83b2a465ea04d9c4c6f7336df8d6538bc383eb8c16ec6b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.13.0
|
Security for bigquery-etl-tools 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.