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

Uploaded Source

Built Distribution

koza-0.1.14-py3-none-any.whl (29.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for koza-0.1.14.tar.gz
Algorithm Hash digest
SHA256 4eaf7a337086552d43403718dc5c6b290d7e8574bb03ceb127afe2de970b1a7b
MD5 306a5e6bb70b2cd84a60e8c12f0be9cf
BLAKE2b-256 549f8ba9432cc2e22457ba43393464911796fcde23c6bf3943055b1447bd344d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for koza-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 aa6bc8f072177db3374c495ed9d1b2301a4774e179e601ad0038fbb15009e570
MD5 db4387bfc9f188e73fafc95909c751b5
BLAKE2b-256 630d6ae4dbd9a0beb62778dafec034f1bf8ed0c4cb813e7604602766a3df1bec

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