Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Generate SQL tables, load and extract data, based on JSON Table Schema descriptors.

Project description

Travis
Coveralls
PyPi
SemVer
Gitter

Generate and load SQL 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-sql

Storage

Package implements Tabular Storage interface.

SQLAlchemy is used as sql wrapper. We can get storage this way:

from sqlalchemy import create_engine
from jsontableschema_sql import Storage

engine = create_engine('sqlite:///:memory:', prefix='prefix')
storage = Storage(engine)

Then we could interact with storage:

storage.buckets
storage.create('bucket', descriptor)
storage.delete('bucket')
storage.describe('bucket') # return descriptor
storage.iter('bucket') # yield rows
storage.read('bucket') # return rows
storage.write('bucket', rows)

Mappings

schema.json -> SQL table schema
data.csv -> SQL talbe data

Drivers

SQLAlchemy is used - docs.

Contributing

Please read the contribution guideline:

How to Contribute

Thanks!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for jsontableschema-sql, version 0.8.0
Filename, size File type Python version Upload date Hashes
Filename, size jsontableschema_sql-0.8.0-py2.py3-none-any.whl (10.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size jsontableschema-sql-0.8.0.tar.gz (9.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page