Skip to contents

This function takes a snapshot of the current state of the data, including the step name, columns, selected rows, and additional information. It also computes a hash of the data to ensure uniqueness.

Usage

step_snapshot(
  x,
  step_name = NA_character_,
  .cols = NULL,
  selected = NULL,
  info = NULL,
  message = NA_character_,
  milestone = NA_character_,
  snapshot_data = FALSE
)

Arguments

x

A survey tibble.

step_name

A character string representing the name of the step.

.cols

A quosure representing the columns to be included in the snapshot.

selected

Vector of selected column names.

info

Additional information to be included in the snapshot.

message

A character string representing a message to be included in the snapshot.

milestone

A character string representing a milestone to be included in the snapshot.

snapshot_data

Logical indicating whether to include the data in the snapshot. Default is FALSE.

Examples

if (FALSE) { # \dontrun{
data("srv_example", package = "g6tr.survey")
  
get_lineage(srv_example)
x <- srv_example |> step_snapshot("snapshot_data", snapshot_data = TRUE)
get_lineage(x)
get_lineage(x, 0, "data")

} # }