From ea4d8c7d6d907e519c1994ef64673bdddeea804c Mon Sep 17 00:00:00 2001 From: Wataru Otsubo Date: Tue, 12 Nov 2024 18:18:00 +0900 Subject: [PATCH] update(import_data.jl): add error message on single_result_table format - missing motherboard id --- src/import_data.jl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/import_data.jl b/src/import_data.jl index 008a469..9e5d1de 100644 --- a/src/import_data.jl +++ b/src/import_data.jl @@ -141,7 +141,15 @@ function add_psboard_ids(db::SQLite.DB, single_result_table::DataFrame) dropmissing!(df, :daughterboard) return (daughterboard = df.daughterboard |> last,) end - filter!(:motherboard_id => !=(999999), df) + try + filter!(:motherboard_id => !=(999999), df) + catch + id_missings = findall(ismissing, df.motherboard_id) + if !isempty(id_missings) + @error "motherboard id at row $(id_missings) are missing. motherboard id cannot be null" + error("single_result_table format error") + end + end stmt_insert_psbid = DBInterface.prepare( db,