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

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

jsontableschema-sql-0.7.4.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

jsontableschema_sql-0.7.4-py2.py3-none-any.whl (10.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file jsontableschema-sql-0.7.4.tar.gz.

File metadata

File hashes

Hashes for jsontableschema-sql-0.7.4.tar.gz
Algorithm Hash digest
SHA256 b768907ca057bd5ef4e6ce30d2c18bcce11f0548c6b5da79baed978e0ec552ce
MD5 3aac5d85e334405433db6b8d7d829a20
BLAKE2b-256 0ead1631dca2d8813eb3c38201c893ace9faaec22f9fa03cab79820b32fc4cb1

See more details on using hashes here.

Provenance

File details

Details for the file jsontableschema_sql-0.7.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for jsontableschema_sql-0.7.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fa7b57c2a821721bccdd068915801b3fc364d8de006adb37dd30ee064659a152
MD5 35ced9b68cc58612b903b51aff7536ba
BLAKE2b-256 60358fa9f62e10fc22e2745330fae1b0338616b3ea0ab920077d30dab5196785

See more details on using hashes here.

Provenance

Supported by

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