Generate SQL tables, load and extract data, based on JSON Table Schema descriptors.
Project description
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.
API Reference
Snapshot
https://github.com/frictionlessdata/jsontableschema-py#snapshot
Detailed
Contributing
Please read the contribution guideline:
Thanks!
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 jsontableschema-sql-0.8.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0ace5efbb66bb875e8a9d4e9735d267d77cf58cb568d55f9853f8465f06acdb |
|
MD5 | 3077ea1e7caf526f82c0d78c4f7d48ef |
|
BLAKE2b-256 | 2f7803febef2cd1268e55469be1cfa68a06bf8f2bd69ff2e79734085155d8f70 |
Close
Hashes for jsontableschema_sql-0.8.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fde0700cacf2174d80e4619d24f7905f2832ee59b02eb7481aaad73a9fd6811c |
|
MD5 | 1e230073bf106be78ed6f42e8efac6a6 |
|
BLAKE2b-256 | 4e900dc3230fcdf14e76424bbf9ad8349d5b9058bae2b0669719dbb21f2b0f1f |