Skip to main content

Carrot Logo

Release License

Streamlined Data Transformation to OMOP


Carrot Transform automates data transformation processes and facilitates the standardisation of datasets to the OMOP vocabulary, simplifying the integration of diverse data sources.


Explore the docs »

Carrot Mapper is a webapp which allows the user to use the metadata (as output by WhiteRabbit) from a dataset to produce mapping rules to the OMOP standard, in the JSON format. These can be ingested by Carrot Transform to perform the mapping of the contents of the dataset to OMOP.

Carrot Transform transforms input data into tab separated variable files of standard OMOP tables, with concepts mapped according to the provided rules (generated from Carrot Mapper).

Quick Start

To have the project up and running, please follow the Quick Start Guide.

If you need to perform development, there's a brief guide here to get the tool up and running.

Formatting and Linting

This project is using ruff to check formatting and linting. The only dependency is the uv command line tool. The .vscode/tasks.json file contains a task to run this tool for the currently open file. The commands can be run on thier own (in the root folder) like this ...

# reformat all the files in `./`
λ uv run ruff format .

# run linting checks all the files in `./` 
λ uv run ruff check .

# check and fix all the files in `./`
λ uv run ruff check --fix .

# check and fix all the files in `./` but do so so more eggrsively
λ uv run ruff check --fix --unsafe-fixes .

SQLAlchemy Workflow

Carrot-Transform can read input tables from SQLAlchemy. This is experimental, and requires specifying a connection-string as --input-db-url instead of an input dir folder. The person-file parameter and carrot-mapper workflow should still be used, as if working with .csv files, but carrot-transform can read from an SQLAlchemy database.

  1. Extract/export some rows from the various tables
    • something like SELECT column_name(s) FROM patients LIMIT 1000; is written to patients.csv
  2. the usual scan reports are performed on these subsets
  3. when carrot-transform is invoked instead of --input-dir one specifies --input-db-url with a database connection string
    • the --person-file parameter should still point to the equivalent of person_tablename.csv
    • the --rules-file parameter needs to refer to a file on the disk as usual
  4. carrot transform will still write data to --output-dir and otherwise operate as normal
    • The following parameters have undefined behaviour with this functionality
      • --write-mode
      • --saved-person-id-file
      • --use-input-person-ids
      • --last-used-ids-file

Release Procedure

To release a new version of carrot-transform follow the steps outlined on the documentation website.

License

This repository's source code is available under the MIT license.

Metadata

Release files for carrot-transform 0.7.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for carrot-transform 0.7.3
File Size Uploaded Provenance Actions
carrot_transform-0.7.3.tar.gz 248.5 kB With provenance Details for carrot_transform-0.7.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for carrot-transform 0.7.3
File Interpreter ABI Platform Actions
carrot_transform-0.7.3-py3-none-any.whl Python 3 none any Details for carrot_transform-0.7.3-py3-none-any.whl

Total release size: 511.5 kB

Release files / carrot_transform-0.7.3.tar.gz

Download URL carrot_transform-0.7.3.tar.gz
Size 248.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d8ccb003358324be3765e74f91fe50e790df547427728f7f05a56e130fa7d1de
BLAKE2b-256 checksum
How to use checksums
64d43e6c454db68cf3eb8365c451a2b3b48072132f9d1877cb34fbc50e12d5dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 20, 2026.

Transparency log

Release files / carrot_transform-0.7.3-py3-none-any.whl

Download URL carrot_transform-0.7.3-py3-none-any.whl
Size 263.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97e2f4cc7baf99d064629e348b81baa737d5f51f5f588bcbdc5737a687bff4d1
BLAKE2b-256 checksum
How to use checksums
b9272861c3ce9b5ac2fbfa10e5fa3fc01e8b6529fcc770d183d1d37b01a140bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 20, 2026.

Transparency log

Security for carrot-transform 0.7.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for carrot_transform-0.7.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page