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

Uploaded Source

Built Distribution

koza-0.1.8-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for koza-0.1.8.tar.gz
Algorithm Hash digest
SHA256 d4db9508766b51962c17b5de9af94dd9e5cae4af1945915978598008f252a665
MD5 1f1f2bcb034588200b2b28839b34ed1f
BLAKE2b-256 84692d38d23d8ad127b6fc11b1f27797f7d35f778151ab1fde7872cada3e1f72

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for koza-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 cff528d4b0139d81804a229ac9c76dad9a20001a45b0e184c3e808307a851b47
MD5 1a21a0c68f2c0608637917c64c96abc9
BLAKE2b-256 4113e3dcbb8e49e9f4e3c7cb50a5709823af192485d74a3ea095fadb04ce06b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page