Skip to main content

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

Metadata

Release files for vdv2pg 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vdv2pg 0.0.2
File Size Uploaded
vdv2pg-0.0.2.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vdv2pg 0.0.2
File Interpreter ABI Platform
vdv2pg-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.8 kB

Release files / vdv2pg-0.0.2.tar.gz

Download URL vdv2pg-0.0.2.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
393380cf32435e97052fe3a603441a5bd0094be7b6f57e7a1ee57b189aeae494
BLAKE2b-256 checksum
How to use checksums
0c1bbd752c29ddd42212a5dfae3255b66070241847b2d43a56b6dca1ddf16c9e
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / vdv2pg-0.0.2-py3-none-any.whl

Download URL vdv2pg-0.0.2-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb12fa5f3225c44accd1ba5098b0755eb5642bf9f3e14303a1be6d18cd913f8b
BLAKE2b-256 checksum
How to use checksums
9fbbbe3a76c08d544a10e53b8c16944f123777f151642eec459af88fe21f1f13
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page