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.5.tar.gz
.
File metadata
- Download URL: koza-0.1.5.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 | a0b2736dee51603d0ebe26026dbcfbfd5617577307373bca413fa1897f7acef5 |
|
MD5 | 10a6aae2fb9d0de448b04aa4a77df630 |
|
BLAKE2b-256 | 32190b8ff67fd98f62c540a31c638ef2a1c1761a2ed009cd92557678ad6aebb9 |
File details
Details for the file koza-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: koza-0.1.5-py3-none-any.whl
- Upload date:
- Size: 25.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0712f7907621fc4270e1d113c46d6a037d1622d07da6187d45ae84947def3b03 |
|
MD5 | 6bcbead3b69e40b3f1f83a6221d4aad6 |
|
BLAKE2b-256 | 30930f1d98077660a7386c2cbce7a8e50066b83d60a6ee62a86e068239c0221e |