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

Uploaded Source

Built Distribution

koza-0.0.1a3-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file koza-0.0.1a3.tar.gz.

File metadata

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

File hashes

Hashes for koza-0.0.1a3.tar.gz
Algorithm Hash digest
SHA256 63cf82c08369c8029d5546e04f221324e438b20db2763dee3366426cf91bb542
MD5 23ab3c40895a61169705518d755c6728
BLAKE2b-256 14d0c6f1f7f562ab8c1a07d7ef2e41ee5e26166526678f75d7a187c2ab8826f2

See more details on using hashes here.

File details

Details for the file koza-0.0.1a3-py3-none-any.whl.

File metadata

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

File hashes

Hashes for koza-0.0.1a3-py3-none-any.whl
Algorithm Hash digest
SHA256 182b45633ca52e3171454504bed68b48e33bfa8aaf8524aa58570923aeef68ac
MD5 f174d398751327b1ff36dd3d6b84240f
BLAKE2b-256 f4f9eb4cff85f26d82986eb3dcd776de6551fdbc8158bfcb4556ae33396d247d

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