DRDataRaft/ docs
GitHub ↗

dr_add_source()

Store a named primary input without reading it. A workflow can instead bind one delivery with data = at execution. For several primary sources, use a transformation that combines their named list before table operations.

Usage

dr_add_source(x, source, name = NULL, reader = NULL, replace = FALSE)

Arguments

x
A dr_product() definition.


source
Data frame, file path, function or source adapter.


name
Optional source name, generated when omitted.


reader
Optional file reader. CSV, TSV, RDS and Excel have defaults.


replace
Replace a source with the same name explicitly.

Value

An updated definition. No source data are read.

Examples

flow <- dr_product("orders") |>
  dr_add_source(data.frame(id = 1:2, amount = c(25, 75)), name = "orders")
dr_collect(dr_run(write = FALSE, stop_on_failure = FALSE, flow))

See also

dr_set_sources(), dataraft.adapters::dr_source_database(), dr_run()
Documentation source snapshot · View source at d9cb454 ↗
Code examples are documented source examples; they are not executed in this website build.

Search documentation

Search functions, packages and guides.