Skip to content

Table Schemas🔗

Table schemas define the tables and columns available to query in a dataset definition. The schema a dataset definition is written against determines which backends it can be run inside.

Below are a list of all table schemas available in ehrQL, together with the backends that support them.

beta.tpp🔗

view details →

Available on backends: TPP

This defines all the data (both primary care and externally linked) available in the TPP backend.

beta.core🔗

view details →

Available on backends: TPP, EMIS

This schema defines the core tables and columns which should be available in any backend providing primary care data, allowing dataset definitions written using this schema to run across multiple backends.

Warning

This schema is still a work-in-progress while the EMIS backend remains under development. Projects requiring EMIS data should continue to use the Cohort Extractor tool.

beta.smoketest🔗

view details →

Available on backends: TPP, EMIS

This tiny schema is used to write a minimal dataset definition that can function as a basic end-to-end test (or "smoke test") of the OpenSAFELY platform across all available backends.

examples.tutorial🔗

view details →

This schema is for development or testing purposes and is not available on any backend.

This example schema is for use in the ehrQL tutorial.