DeltaTableBuilder-class: S4 class that represents pending table build operation

DeltaTableBuilder-classR Documentation

S4 class that represents pending table build operation

Description

S4 class that represents pending table build operation

Slots

method

character name of the initializer method

ops

list list of operations in form of list(.method = ..., args = list(...))

Note

DeltaTableBuilder, since 1.0.0

See Also

dlt_create(), dlt_create_if_not_exists(), dlt_replace(), dlt_create_or_replace()

Examples

## Not run: 
# Create DeltaTable in a given location
path <- tempfile()

dlt_create() %>%
  dlt_location(path) %>%
  dlt_add_column("id", "integer", nullable = FALSE) %>%
  dlt_add_columns(structType("key string, value double")) %>%
  dlt_partitioned_by("key") %>%
  dlt_comment("Key-value table") %>%
  dlt_property("creation-time", as.character(Sys.time())) %>%
  dlt_execute()

# Create DeltaTable with a given table name
table_name <- paste0("delta_table_", paste(base::sample(letters, 10, TRUE), collapse = ""))

dlt_create() %>%
  dlt_table_name(table_name) %>%
  dlt_add_column("id", "integer") %>%
  dlt_execute()

## End(Not run)


zero323/dlt documentation built on Dec. 1, 2022, 11:25 p.m.