You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ehrQL lets you supply your own --dummy-data-file (distinct from --dummy-tables). It ingests this, checks that it meets minimum syntactic constraints and then writes it out in the required output format.
If the dummy data file contains extra columns which aren't in the dataset definition these are ignored. I think this is the desired behaviour, but it would also be helpful to warn the user that these extra columns are being ignored.
ehrQL lets you supply your own
--dummy-data-file
(distinct from--dummy-tables
). It ingests this, checks that it meets minimum syntactic constraints and then writes it out in the required output format.If the dummy data file contains extra columns which aren't in the dataset definition these are ignored. I think this is the desired behaviour, but it would also be helpful to warn the user that these extra columns are being ignored.
This came up in @wjchulme's dummy data workshop.
Implementation notes
I think we'd need to supply some new argument to
read_rows()
e.g.warn_on_extra_columns=True
:ehrql/ehrql/main.py
Lines 127 to 130 in 95197de
This would need to be threaded through to the
reader
constructor:ehrql/ehrql/file_formats/__init__.py
Lines 33 to 40 in 95197de
I think we'd probably want to refactor things slightly here so that the
validate_columns()
function:ehrql/ehrql/file_formats/base.py
Lines 72 to 81 in 95197de
Becomes a
_validate_columns(column_names)
method onBaseRowsReader
which subclasses can then invoke to do the right thing:ehrql/ehrql/file_formats/base.py
Line 8 in 95197de
The text was updated successfully, but these errors were encountered: