dm (version 0.0.3.9003)

cdm_get_pk: Retrieve the name of the column marked as primary key of a table of a dm object

Description

cdm_get_pk() returns the name of the column marked as primary key of a table of a dm object. If no primary key is set for the table, an empty character vector is returned.

Usage

cdm_get_pk(dm, table)

Arguments

dm

A dm object.

table

A table in the dm

See Also

Other primary key functions: cdm_add_pk, cdm_get_all_pks, cdm_has_pk, cdm_rm_pk, enum_pk_candidates

Examples

Run this code
# NOT RUN {
library(dplyr)
nycflights_dm <- cdm_nycflights13()

nycflights_dm %>%
  cdm_get_pk(planes)
# }

Run the code above in your browser using DataLab