Skip to contents

Obtain the names of the attributes that form the primary key of a flat table, if defined.

Usage

get_pk_attribute_names(ft, as_definition)

# S3 method for flat_table
get_pk_attribute_names(ft, as_definition = FALSE)

Arguments

ft

A flat_table object.

as_definition

A boolean, as the definition of the vector in R.

Value

A vector of strings or a tibble, attribute names.

See also

flat_table

Other flat table join functions: check_lookup_table(), join_lookup_table(), lookup_table()

Examples


ft <- flat_table('iris', iris) |>
  lookup_table(
    measures = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width"),
    measure_agg = c('MAX', 'MIN', 'SUM', 'MEAN')
  )
names <- ft |>
  get_pk_attribute_names()