在命令中应该提到down_job
依赖up_job
,或者up_job
创建file_out()
者。up_job
down_job
使用 up_job 返回值的示例
library(drake)
plan <- drake_plan(
db_path = create_sql_db_from(file_in("some_input.csv")),
down_job = download_from_sql(db = db_path, file_in("my_code.sql"))
)
plan
#> # A tibble: 2 x 2
#> target command
#> <chr> <chr>
#> 1 db_path "create_sql_db_from(file_in(\"some_input.csv\"))"
#> 2 down_job "download_from_sql(db = db_path, file_in(\"my_code.sql\"))"
config <- drake_config(plan)
vis_drake_graph(config)
文件路径示例
library(drake)
plan <- drake_plan(
up_job = create_sql_db_from(file_in("some_input.csv"), file_out("db_path")),
down_job = download_from_sql(file_in("db_path"), file_in("my_code.sql"))
)
plan
#> # A tibble: 2 x 2
#> target command
#> <chr> <chr>
#> 1 up_job "create_sql_db_from(file_in(\"some_input.csv\"), file_out(\"db_…
#> 2 down_job "download_from_sql(file_in(\"db_path\"), file_in(\"my_code.sql\…
config <- drake_config(plan)
vis_drake_graph(config)
由reprex 包(v0.2.1)于 2019 年 1 月 25 日创建