Add/copy runs - #42
Conversation
|
Need SLRatio table for Chinook |
|
We should update copy_runs to silently return the new RunIDs. This will allow us to more easily leverage this with the multi-run FRAM option, as we can automate copying TAMMs with appropriate RunID suffixes. Happy to tackle this in the near term. |
…ared into add/copy_runs Ty recently merged main into this branch, I want to pull those changes into my local work.
|
Major changes:
|
Ty-WDFW
left a comment
There was a problem hiding this comment.
glue_statement <- glue::glue("UPDATE {{table_name}}
Set {glue_changes}
Where {glue_conditions};
")
results <- df |>
dplyr::rowwise() |>
dplyr::mutate(db_call = glue::glue(glue_statement)) |>
dplyr::mutate(rows_affected = DBI::dbExecute(fram_db$fram_db_connection,
statement = .data$db_call
)) |>
dplyr::mutate(db_call = as.list(.data$db_call))So the assumption on this is the that the there are the same number of rows between the two datasets. What if there a different number of rows? This would be a corner case in FRAM, but could lead to unexpected behavior, we should check the integrity of this
|
Sounds good! We should talk through this to make sure I understand -- I haven't really wrapped my head around your SQL code here. |
|
We've talked through the modify_run() code above. Do we have any other concerns, or can we merge now? |
#38
Copies a run's inputs x times. To save space not copying outputs, assuming that this will be used for sensitivity analyses.