How to save partial meta file as part of the pipeline #1287
-
Help
DescriptionI would like to save a smaller version of the table created by I am assuming there is no way to modify how targets itself is writing the meta file, so I tried running write_meta <- function(names, path) {
tar_meta(names = names, fields = c(name, type, data, command, depend)) |>
arrange(desc(type)) |>
write_delim(path, delim = "|")
path
} and in tar_target(meta_small, write_meta(everything(), "_targets/meta/meta-small"), format = "file") I also tried loading the meta text file, subsetting and saving it again but this does not seem to be a smart idea since target will write the meta file only when the pipeline is completed (I assume). Do you have any suggestions for me (or possibly even better ideas for my workflow)? The only thing I have in mind would be to create a shortcut/snippet that runs |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think it would be pragmatic to call |
Beta Was this translation helpful? Give feedback.
Great to have your input, I really appreciate it! I now call
tar_make()
andtar_meta()
with a single shortcut defined with the shrtcts package and the output is easy to digest at a single glance even when screen real estate is limited:Next I will try to trigger unit tests with the same shortcut – it seems reasonable to keep those outside of the main pipeline as well. Thanks again for considering my niche use case! 🙏