Skip to content

linkml/linkml-map

Repository files navigation

linkml-map

Pyversions PyPi codecov

LinkML Map is a framework for specifying and executing declarative mappings between data models. At its core is the TransformationSpecification — a YAML-based language for describing how to map one data model to another, independent of serialization format or execution engine.

Features:

  • YAML-based lightweight transformation syntax
  • Python library for executing mappings on data files
  • Tabular data support (TSV/CSV) with streaming for large datasets
  • Experimental SQL compilation backend (DuckDB) for set-based transforms
  • Derivation of target (implicit) schemas, allowing easy customization of data models (profiling)
  • Simple YAML dictionaries for simple mappings
  • Automatic unit conversion
  • Use of subset of Python to specify complex mappings
  • Visualizations of mappings
  • Mappings are reversible (provided all expressions used are reversible)
  • Multiple output formats (YAML, JSON, JSONL, TSV, CSV)

For full documentation see linkml.io/linkml-map/.

Status:

The transformation data model is not yet fully stable, and may be subject to change. Not all parts of the model are implemented in the reference Python framework.

Quickstart

Install:

pip install linkml-map
# or, in a uv-managed project: uv add linkml-map

When using uv, prefix CLI invocations with uv run (e.g. uv run linkml-map --help).

Run the included example (the example files live in this repo):

git clone https://github.com/linkml/linkml-map.git
cd linkml-map/tests/input/examples/personinfo_basic
linkml-map map-data --unrestricted-eval \
  -T transform/personinfo-to-agent.transform.yaml \
  -s source/personinfo.yaml \
  data/Container-001.yaml

See the Quick Start guide for the expected output and next steps.

More

Packages

 
 
 

Contributors

Languages