Koza, an ETL framework for LinkML data models
Project description
Koza
Data transformation framework
Disclaimer: Koza is in beta; we are looking for beta testers
Transform csv, json, yaml, jsonl, and xml and converting them to a target csv, json, or jsonl format based on your dataclass model. Koza also can output data in the KGX format
Documentation: https://koza.monarchinitiative.org/
Highlights
- Author data transforms in semi-declarative Python
- Configure source files, expected columns/json properties and path filters, field filters, and metadata in yaml
- Create or import mapping files to be used in ingests (eg id mapping, type mappings)
- Create and use translation tables to map between source and target vocabularies
Installation
pip install koza
Getting Started
Send a local or remove csv file through Koza to get some basic information (headers, number of rows)
koza validate \
--file https://raw.githubusercontent.com/monarch-initiative/koza/main/examples/data/string.tsv \
--delimiter ' '
Sending a json or jsonl formatted file will confirm if the file is valid json or jsonl
koza validate \
--file ./examples/data/ZFIN_PHENOTYPE_0.jsonl.gz \
--format jsonl
koza validate \
--file ./examples/data/ddpheno.json.gz \
--format json \
--compression gzip
Example: transforming StringDB
koza transform --source examples/string/protein-links-detailed.yaml --global-table examples/translation_table.yaml
koza transform --source examples/string-declarative/protein-links-detailed.yaml --global-table examples/translation_table.yaml
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 koza-0.1.4.tar.gz
.
File metadata
- Download URL: koza-0.1.4.tar.gz
- Upload date:
- Size: 222.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71e2359343060e404692b7e201638e75be28a99c9d031dc275a8c2ba903af0b5 |
|
MD5 | 892b12713afee4ab44425ff502d213f0 |
|
BLAKE2b-256 | 2acb67796c0dc15dbc7e2cfef4b74a5b09d95add66207b612c7d390632092a08 |
File details
Details for the file koza-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: koza-0.1.4-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea229601265c8587002b5b26dc3b64c6342b3d09678a767b9bbe8c913318000e |
|
MD5 | f96d9b5a27dec35dc5f349c4ec4b6e58 |
|
BLAKE2b-256 | f5863b31cd7b2d85b6f29f268942e4adf6074c838fb2b94efc1ae32ebb6d4e36 |