Skip to main content

Koza, an ETL framework for the Biolink model

Project description

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

Uploaded Source

Built Distribution

koza-0.1.0-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for koza-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f9f54bcccd1cf558944193bd0b0c54b922f04726f87734595aabb4a762dde98f
MD5 589957949b463e443aa935ea6de8914a
BLAKE2b-256 b5ade2215ed2e6311fd91fcc9fccb9a89cb30222b34a5ab65771ccc8fea4e949

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for koza-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9974b414b30483e998a777e25f112e0639b73eccde6861a7c36f436ca750fc2f
MD5 6c4cbbf6168ec7c09f88e2e42d72290a
BLAKE2b-256 22b04a511df59a644a60e97e1e1c1ebbad1af420c6955d5e9bb03670629716f2

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