Skip to main content

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 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:

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.

Source Distribution

tableschema-sql-0.9.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tableschema_sql-0.9.0-py2.py3-none-any.whl (10.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file tableschema-sql-0.9.0.tar.gz.

File metadata

File hashes

Hashes for tableschema-sql-0.9.0.tar.gz
Algorithm Hash digest
SHA256 a82e7448016b2a0121b70e64c2818d3ae869666f7b38f2998f95d9bef82a9331
MD5 741d19242261c605a7dffcdcd65f65dc
BLAKE2b-256 d64e65c178ce5e54953b22096a93d71bd729ee47f7311d2b1bba23b7987a2adb

See more details on using hashes here.

File details

Details for the file tableschema_sql-0.9.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for tableschema_sql-0.9.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7776b4f1cd40348dba7cc538a718a22291dbdf70842bf5951977e88c22547b3e
MD5 2f9e8778b359ddcf3b73436df69cecd8
BLAKE2b-256 e4c5cc38b3e99a9fd28022fce2e0a5e382e09d91c396d220cc89b2cc45027f71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page