jsontableschema-bigquery-py
Generate and load BigQuery tables based on JSON Table Schema descriptors.
Version v0.3 contains breaking changes:
renamed Storage.tables to Storage.buckets
changed Storage.read to read into memory
added Storage.iter to yield row by row
Getting Started
Installation
pip install jsontableschema-bigquery
Storage
Package implements Tabular Storage interface.
To start using Google BigQuery service:
Create a new project - link
Create a service key - link
Download json credentials and set GOOGLE_APPLICATION_CREDENTIALS environment variable
We can get storage this way:
import io
import os
import json
from apiclient.discovery import build
from oauth2client.client import GoogleCredentials
from jsontableschema_bigquery import Storage
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = '.credentials.json'
credentials = GoogleCredentials.get_application_default()
service = build('bigquery', 'v2', credentials=credentials)
project = json.load(io.open('.credentials.json', encoding='utf-8'))['project_id']
storage = Storage(service, project, 'dataset', prefix='prefix')
Then we could interact with storage:
storage.buckets
storage.create('bucket', descriptor)
storage.delete('bucket')
storage.describe('bucket') # return descriptor
storage.iter('bucket') # yields rows
storage.read('bucket') # return rows
storage.write('bucket', rows)
Mappings
schema.json -> bigquery table schema data.csv -> bigquery talbe data
Drivers
Default Google BigQuery client is used - docs.
API Reference
Snapshot
https://github.com/frictionlessdata/jsontableschema-py#snapshot
Detailed
Contributing
Please read the contribution guideline:
Thanks!
Metadata
Release files for jsontableschema-bigquery 0.5.0
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 |
|---|---|---|---|---|
| jsontableschema-bigquery-0.5.0.tar.gz | 8.0 kB | Without provenance | Details for jsontableschema-bigquery-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jsontableschema_bigquery-0.5.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for jsontableschema_bigquery-0.5.0-py2.py3-none-any.whl |
Total release size: 17.5 kB
Release files / jsontableschema-bigquery-0.5.0.tar.gz
| Download URL | jsontableschema-bigquery-0.5.0.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2aa5db666d81c652aa3a0cc6ffc7d5a668518a2455b9901d44f82af0f7d77197
|
|
BLAKE2b-256 checksum How to use checksums |
07e6acc1ca3ef200c44967705c16f7c2db0c8dd9a8c274786e3b74f4eafa393c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / jsontableschema_bigquery-0.5.0-py2.py3-none-any.whl
| Download URL | jsontableschema_bigquery-0.5.0-py2.py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
ab26f4b081130675b7ec0b2f55ecf047ad840a8493a990a93d3356f3ad6a053e
|
|
BLAKE2b-256 checksum How to use checksums |
5808efcf7dab5af14aa683d67c519a0f6235c3c940d8d7dbd877093d891f5dc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for jsontableschema-bigquery 0.5.0
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.