Skip to main content

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

  1. following instruction, download bigquery-emulator command.

  2. install this package.

pip install bqemulatormanager
  1. 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.

Release files for bqemulatormanager 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bqemulatormanager 0.2.3
File Size Uploaded
bqemulatormanager-0.2.3.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bqemulatormanager 0.2.3
File Interpreter ABI Platform
bqemulatormanager-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size:9.4 kB

Release files / bqemulatormanager-0.2.3.tar.gz

Download URL bqemulatormanager-0.2.3.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5c0702c2d923c79ffb4d90b30417226f4f766cd05e4abbefd4182043519f448f
BLAKE2b-256 checksum
How to use checksums
7320cbdfd55dc24f61760509cca92b47b231d9cb51b90984da52af904b1b5b26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 17, 2024.

Transparency log

Release files / bqemulatormanager-0.2.3-py3-none-any.whl

Download URL bqemulatormanager-0.2.3-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07f031a6f3e52c1d4a24eff9f55e66817ecddb4d5a336fddeed7f4c3000254c7
BLAKE2b-256 checksum
How to use checksums
e39faab7e50afcbdcee2ed9529db09ce62181c0ba0a4cce8dd982d2f9ad07514
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 17, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page