lines <- c(
"-- !preview conn=DBI::dbConnect(RSQLite::SQLite())",
"-- targets::tar_load(data1)",
"-- targets::tar_read(data2)",
"select 1 as my_col",
""
)
query <- tempfile()
writeLines(lines, query)
tar_sql_deps(query)
Run the code above in your browser using DataLab