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 schema defines the data (both primary care and externally linked) available in the OpenSAFELY-TPP backend. For more information about this backend, see "SystmOne Primary Care".

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.

beta.raw.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.

The data provided by this schema are minimally transformed. They are very close to the data provided by the underlying database tables. They are provided for data development and data curation purposes.

beta.raw.tpp🔗

view details →

Available on backends: TPP

This schema defines the data (both primary care and externally linked) available in the OpenSAFELY-TPP backend. For more information about this backend, see "SystmOne Primary Care".

The data provided by this schema are minimally transformed. They are very close to the data provided by the underlying database tables. They are provided for data development and data curation purposes.

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.