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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for koza-0.1.7.tar.gz
Algorithm Hash digest
SHA256 18f42d9d2e52e08fb4a7c544df69a28f886f545effe972301f7667b51dd204b7
MD5 0f119afb69a69071b41f49196be80382
BLAKE2b-256 884e0f48e2aad975146d3e39fbc19080201ad6150cdbdfed6d3b93cc3b400e9e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for koza-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 85faa9963636e2c9bcf3a785b1f4af98c77275268d784c01364df6021440d462
MD5 7cfcf1fddabf84f853d5232f6410d3f4
BLAKE2b-256 2c28101e0a1e305c9946e41ca90c2bd61fca290cfbc656bd3dd56d41820d66bd

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