Skip to content

Raise nicer error from show() when missing a dummy data file #2675

@evansd

Description

@evansd

A present, the error you get from the show() command when you call it on an expression for which there is no corresponding dummy data file is a bit "computery":

Show line 25:
Error loading file 'analysis/dataset_definition.py':

Traceback (most recent call last):
  File "/workspace/analysis/dataset_definition.py", line 25, in 
    show(dataset.concordant_dates)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
ehrql.file_formats.base.FileValidationError: Missing file: dummy_tables/repeat_medications_raw.csv

We could make this a bit more user-friendly.

Possibly we could generate the command they would need to run to create new dummy tables from their dataset.

This is related to:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions