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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for koza-0.1.9.tar.gz
Algorithm Hash digest
SHA256 4de0762057d18fbcf1d1aa64a8696b6f5542114226cede6e9cd5ee2179a4cc0f
MD5 7de8b899c7a3b2adbbc6464a2634ba9e
BLAKE2b-256 5508fb9ceb5e8b13b592e1c400d250b4aaacc7133589ce43949ffd487707303c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: koza-0.1.9-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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2962f7996ec04e461dcc050945818aa7d34c7340e1d19de129110493688650c3
MD5 41365d94b1dc0bdd42aee1d1a09e99db
BLAKE2b-256 2af9fe881608c7cf903d3b9322e70f0b9bb3ff3f3f6683dcadb8b79275598459

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