mirror of
https://gitlab.cern.ch/wotsubo/PSBoardDataBase.git
synced 2025-06-08 05:55:42 +09:00
update(import_data.jl): add error message on single_result_table format
- missing motherboard id
This commit is contained in:
parent
1868270dab
commit
ea4d8c7d6d
1 changed files with 9 additions and 1 deletions
|
@ -141,7 +141,15 @@ function add_psboard_ids(db::SQLite.DB, single_result_table::DataFrame)
|
||||||
dropmissing!(df, :daughterboard)
|
dropmissing!(df, :daughterboard)
|
||||||
return (daughterboard = df.daughterboard |> last,)
|
return (daughterboard = df.daughterboard |> last,)
|
||||||
end
|
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(
|
stmt_insert_psbid = DBInterface.prepare(
|
||||||
db,
|
db,
|
||||||
|
|
Loading…
Add table
Reference in a new issue