Skip to main content

Koza, an ETL framework for LinkML data models

Project description

Pyversions PyPi

Koza

pupa 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 remote 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

koza-0.1.13.tar.gz (249.5 kB view details)

Uploaded Source

Built Distribution

koza-0.1.13-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

Details for the file koza-0.1.13.tar.gz.

File metadata

  • Download URL: koza-0.1.13.tar.gz
  • Upload date:
  • Size: 249.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.1

File hashes

Hashes for koza-0.1.13.tar.gz
Algorithm Hash digest
SHA256 059c0438ae27993e7179fced1a1d2fed25560445a8ccf561afbfc5ee587a6332
MD5 4cfb1e738604c623a65f699d386870ba
BLAKE2b-256 ac8ebfbeb71b2b2a55dad476a5b33c201eb790c9edb35ef1bcab10797d6d029d

See more details on using hashes here.

File details

Details for the file koza-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: koza-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 29.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.1

File hashes

Hashes for koza-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 53d97a94fa92c091ce5fab3e05f8bbac9e3a9fea36c74077fea44ff3656f51dc
MD5 3725406cd556ff269f9b39cdc7d56310
BLAKE2b-256 b9bdac7c0eb04a4c2fdc7beae7c8ff6cdb5a765b46e5adbce286301a90849e85

See more details on using hashes here.

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