Import VDV 451 files into a database
Project description
Tool for dumping VDV 451 data into a database
This is intended to quickly analyze the content of a collection of VDV files in
the VDV 451 format. By running this script a new schema is created and filled
with one table per inuput file. Some known primary key mappings are used, you
can add more using a config-file (see development.ini.dist
for an example).
After dumping the data a SQL script apply_constraints.sql
is run with the
new schema. It sets foreign keys and indices. You may want to modify that to
fit your needs (some errors are to be expected if you didn't create all tabels
referenced there).
Installation
pip install vdv2pg
Usage
usage: vdv2pg [-h] [--schema SCHEMA] [-c CONFIG]
[--post_ingest_script POST_INGEST_SCRIPT]
database_url input_file [input_file ...]
positional arguments:
database_url Database to write to.
input_file Files to read data from
optional arguments:
-h, --help show this help message and exit
--schema SCHEMA Schema to create tables in (default: vdv2pg)
-c CONFIG, --config_file CONFIG
Optional primary key and logging configuration
--post_ingest_script POST_INGEST_SCRIPT
Optional path to an alternative post-ingest SQL script
Example:
vdv2pg --schema import01 postgresql:///vdv_imports *.X10
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
File details
Details for the file vdv2pg-0.0.2.tar.gz
.
File metadata
- Download URL: vdv2pg-0.0.2.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 393380cf32435e97052fe3a603441a5bd0094be7b6f57e7a1ee57b189aeae494 |
|
MD5 | 9d36d0548cea4e675e809e4cf8e72ecf |
|
BLAKE2b-256 | 0c1bbd752c29ddd42212a5dfae3255b66070241847b2d43a56b6dca1ddf16c9e |
File details
Details for the file vdv2pg-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: vdv2pg-0.0.2-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb12fa5f3225c44accd1ba5098b0755eb5642bf9f3e14303a1be6d18cd913f8b |
|
MD5 | ba860d10c4a4f5f185521d0e6a1f5d82 |
|
BLAKE2b-256 | 9fbbbe3a76c08d544a10e53b8c16944f123777f151642eec459af88fe21f1f13 |