DRDataRaft/ docs
GitHub ↗

V25 Use the offline DuckDB alternative

V25Adapters and additional tools1 step

Use your current course session. Preparation and course runner · R script ↓

Optional deep dive. Enable only the options named in each block, after preparing its packages or services.

V25 Use the offline DuckDB alternative

Goal: Practice lake concepts without DuckLake.

Prerequisites: extras=TRUE; lake, duckdb>=1.5.5, bit64.

Use a separate directory for this backend. This does not migrate the main course lake.

training_step(
  "V25",
  {
    stopifnot(utils::packageVersion("duckdb") >= "1.5.5")
    offline_lake <- dataraft.lake::dr_open_lake(
      file.path(training_root, "offline-duckdb"),
      backend = "duckdb"
    )
    tryCatch(
      {
        offline_release <- dr_publish(policy_product, to = offline_lake)
        print(dataraft.lake::dr_releases(offline_lake, "policies"))
        stopifnot(sum(dr_collect(offline_release)$premium) == 740)
      },
      finally = dataraft.lake::dr_close_lake(offline_lake)
    )
  },
  needs = c("H07"),
  packages = c("dataraft.lake", "duckdb", "bit64"),
  enabled = training_options$extras,
  optional = TRUE
)

Expected result: A managed local release without the DuckLake extension.

Task: How does this differ from H25?

Show solution

The backend is DuckDB. This does not test the DuckLake format or its snapshot management.

Search documentation

Search functions, packages and guides.