Skip to main content

Koza, an ETL framework for the Biolink model

Project description

Koza

pupa Data transformation framework

Disclaimer: Koza is in pre-alpha

Transform csv, json, and jsonl 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

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/dev/tests/resources/source-files/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/metadata.yaml 

koza transform --source examples/string-declarative/metadata.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.0.1a5.tar.gz (235.5 kB view hashes)

Uploaded Source

Built Distribution

koza-0.0.1a5-py3-none-any.whl (25.4 kB view hashes)

Uploaded Python 3

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