DRDataRaft/ docs
GitHub ↗

H26 Connect, close and reconnect

H26DuckLake, releases and reports1 step

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

H26 Connect, close and reconnect

Goal: Understand a connection lifecycle.

Prerequisites: H25; duckdb >=1.5.5; bit64; available DuckLake extension.

A missing extension is installed only when install_extensions is explicitly enabled. If this optional setup fails, dependent lake exercises are skipped.

training_step(
  "H26",
  {
    stopifnot(utils::packageVersion("duckdb") >= "1.5.5")
    training_lake <- dataraft.lake::dr_connect_lake(lake_config)
    print(training_lake)
    dataraft.lake::dr_disconnect_lake(training_lake)
    training_lake <- dataraft.lake::dr_connect_lake(lake_config)
    stopifnot(DBI::dbIsValid(training_lake$con))
  },
  needs = c("H25"),
  packages = c("duckdb", "bit64"),
  enabled = training_options$lake,
  optional = TRUE
)

Expected result: The reopened lake has a valid connection.

Task: Does closing delete the data?

Show solution

No. It closes the connection, not the lake.

Search documentation

Search functions, packages and guides.