bqemulatormanager is a wrapper of bigquery-emulator which provides us BigQuery mock working in local machine.
Project description
BiqQueryEmulator Manager
this package is wrapper of bigquery-emulator which provides us BigQuery mock working in local machine.
using this package, you can
- do unit test of your sql
- download the schema of big query, and use it to make test data
usage
-
following instruction, download
bigquery-emulatorcommand. -
install this package.
pip install bqemulatormanager
- test your sql.
import bqemulatormanager as bqem
import pandas as pd
manager = bqem.Manager(project='test', schema_path='resources/schema_example.yaml')
with manager:
data = pd.DataFrame([
{'id': 1, 'name': 'sato'},
{'id': 2, 'name': 'yamada'}
])
manager.load(data, 'dataset1.table_a')
sql = 'SELECT id, name FROM `dataset1.table_a`'
df = manager.query(sql)
print(df)
unit test example is here.
automatically detect schema
When called Manager.load, SchemaManager search correspond table schema from schema_path (default is bqem_master_schema.yaml).
If schema definition cannot be found, SchemaManager request it from BigQuery in production environment and update master schema file.
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 bqemulatormanager-0.2.3.tar.gz.
File metadata
- Download URL: bqemulatormanager-0.2.3.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c0702c2d923c79ffb4d90b30417226f4f766cd05e4abbefd4182043519f448f
|
|
| MD5 |
32b6e32c28b08203c8cefc174e66be63
|
|
| BLAKE2b-256 |
7320cbdfd55dc24f61760509cca92b47b231d9cb51b90984da52af904b1b5b26
|
Provenance
The following attestation bundles were made for bqemulatormanager-0.2.3.tar.gz:
Publisher:
publish.yml on m3dev/bqemulatormanager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bqemulatormanager-0.2.3.tar.gz -
Subject digest:
5c0702c2d923c79ffb4d90b30417226f4f766cd05e4abbefd4182043519f448f - Sigstore transparency entry: 155952346
- Sigstore integration time:
-
Permalink:
m3dev/bqemulatormanager@9bf9261d3a523b10d49967ae99492f235415f30f -
Branch / Tag:
refs/tags/0.2.3 - Owner: https://github.com/m3dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9bf9261d3a523b10d49967ae99492f235415f30f -
Trigger Event:
push
-
Statement type:
File details
Details for the file bqemulatormanager-0.2.3-py3-none-any.whl.
File metadata
- Download URL: bqemulatormanager-0.2.3-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07f031a6f3e52c1d4a24eff9f55e66817ecddb4d5a336fddeed7f4c3000254c7
|
|
| MD5 |
cf0f9506ef59b59e253860f31e1b36f2
|
|
| BLAKE2b-256 |
e39faab7e50afcbdcee2ed9529db09ce62181c0ba0a4cce8dd982d2f9ad07514
|
Provenance
The following attestation bundles were made for bqemulatormanager-0.2.3-py3-none-any.whl:
Publisher:
publish.yml on m3dev/bqemulatormanager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bqemulatormanager-0.2.3-py3-none-any.whl -
Subject digest:
07f031a6f3e52c1d4a24eff9f55e66817ecddb4d5a336fddeed7f4c3000254c7 - Sigstore transparency entry: 155952347
- Sigstore integration time:
-
Permalink:
m3dev/bqemulatormanager@9bf9261d3a523b10d49967ae99492f235415f30f -
Branch / Tag:
refs/tags/0.2.3 - Owner: https://github.com/m3dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9bf9261d3a523b10d49967ae99492f235415f30f -
Trigger Event:
push
-
Statement type: