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

Uploaded Source

Built Distribution

koza-0.1.11-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for koza-0.1.11.tar.gz
Algorithm Hash digest
SHA256 5b66e12cbd1ab880bc0d0c7bfea82f45b2e31fcbad5998ea3a7a74365cfc3b3b
MD5 b07ed9e542665ec40b649c42e8095504
BLAKE2b-256 7f2382ffb876960f874876a1ebcd5f1e75d40d62ffda5263f1e752df801137f1

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for koza-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 1f2715d49cf9979695448b20a3f045a31e923dda5201d1869c44a6d68ab0a345
MD5 d61e5186fde0d38cf3311f43be641fa4
BLAKE2b-256 6abebdae7bf2d40ad44eec37f06cc394bb3544b1f3f76b7d41a02fbe54aeebe3

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