dr_publish()
Use
dr_run() to try a product without configured framework writers.
dr_run() executes its full configuration, including targets and catalogs.
dr_publish() adds a local lake target when none was supplied. A new folder
uses DuckDB; an existing folder retains its saved backend. dataraft.lake::dr_target_lake()
accepts other lake configurations. Execution automatically validates the
definition before source acquisition.
Use dr_collect() to obtain the output as an ordinary tibble.
Usage
dr_publish(x, name = NULL, to = NULL, ...)
\method{dr_publish}{data.frame}(x, name = NULL, to = NULL, ...)
\method{dr_publish}{dr_product}(x, name = NULL, to = NULL, layer = NULL, execution = NULL, ...)Arguments
- x
- Composed product, data frame, or successful dbt build.
- name
- Product name for a data frame, or an exact or unambiguous model name for a dbt build. Omit it for an already named product.
- to
- Optional target, replacing an already configured target. Defaults
to the
dataraftfolder in the working directory when the product has none. For dbt builds it defaults to the project's configured lake. - ...
- Execution options, including
dataorsourcesfor new deliveries as described indr_run(),stop_on_failureand, for lake targets,business_date,notify,cacheandprevious. Supply a previous publication to reject stale corrections if the destination has changed. dbt builds acceptdataraft.dbt::dr_dbt_publish()options such ascontract,assetandlayer. When an output port has an SLA, supplybusiness_date. Successful publication records the SLA evaluation in run metadata and durable evidence. - layer
- Optional publication layer for a lake target.
- execution
- Optional
dr_execution_config()defaults for products, overriding defaults stored bydr_product(execution = ).
Value
A run result. An exception on failure includes
condition$result.
Examples
\dontshow{if (requireNamespace("dataraft.lake", quietly = TRUE) && requireNamespace("duckdb", quietly = TRUE)) withAutoprint(\{ # examplesIf}
root <- tempfile("dataraft-")
result <- dr_product("orders") |>
dr_add_source(data.frame(id = 1:2)) |>
dr_publish(to = root)
dr_collect(result)
unlink(root, recursive = TRUE)
\dontshow{\}) # examplesIf}Documentation source snapshot · View source at d9cb454 ↗
Code examples are documented source examples; they are not executed in this website build.
Code examples are documented source examples; they are not executed in this website build.