No project description provided
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-emulator
command. -
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)
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
Close
Hashes for bqemulatormanager-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc4216ad32d380e05ea3d3570fae9e9c6285f5a92e3b8899f972650fd5447238 |
|
MD5 | 6e66b866097a7e016019b7f86406370b |
|
BLAKE2b-256 | 2d2da2eba25040891169c1b1b5fb5bd02af64f0ffde576182c679ff7209fa0b3 |