Skip to main content
Travis
Coveralls
PyPi
SemVer
Gitter

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:

How to Contribute

Thanks!

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)

Source distribution for jsontableschema-bigquery 0.5.0
File Size Uploaded
jsontableschema-bigquery-0.5.0.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jsontableschema-bigquery 0.5.0
File Interpreter ABI Platform
jsontableschema_bigquery-0.5.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

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

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

1 release file

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