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 tableschema-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 tableschema_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
tableschema-sql-0.9.0.tar.gz
(9.1 kB
view hashes)
Built Distribution
Close
Hashes for tableschema_sql-0.9.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7776b4f1cd40348dba7cc538a718a22291dbdf70842bf5951977e88c22547b3e |
|
MD5 | 2f9e8778b359ddcf3b73436df69cecd8 |
|
BLAKE2b-256 | e4c5cc38b3e99a9fd28022fce2e0a5e382e09d91c396d220cc89b2cc45027f71 |