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


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.6.tar.gz (222.2 kB view details)

Uploaded Source

Built Distribution

koza-0.1.6-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for koza-0.1.6.tar.gz
Algorithm Hash digest
SHA256 bd2604e96a6fde3beef147191d94ba13ce7c1755e5ada96cf8871cc9159c8776
MD5 844408e27a3e32ecbdfefd86da9e419c
BLAKE2b-256 f2967a96144c235c41bb9d7c0ec0c6b3b91de3e469737992340958c463af3c3c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for koza-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 500bfa4ff5c12f354070cf0bf911f03645d389aa95442b06fcc09d1d6370d9bd
MD5 e21e562f180b321a6aa6ce599bc2e485
BLAKE2b-256 5072663bffdbd36b3b01a7c59a8198c4b9ea3385fe15aa777a9af07a2b36ccc6

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