# NOT RUN {
library(dplyr)
nycflights_dm <- dm_from_src(src_df(pkg = "nycflights13"))
# the following works
cdm_add_pk(nycflights_dm, planes, tailnum)
cdm_add_pk(nycflights_dm, airports, faa)
cdm_add_pk(nycflights_dm, planes, manufacturer, check = FALSE)
# the following does not work (throws an error)
try(cdm_add_pk(nycflights_dm, planes, manufacturer))
# }
Run the code above in your browser using DataLab