Checks that no key has more than one description or columnType. Throws error if the dictionary is invalid.
verify_dictionary_structure(dictionary)
dictionary | Dataframe with columns 'key', 'description', and 'columnType'. |
---|
if (FALSE) { # Valid dat <- data.frame( key = c("first_name", "first_name"), description = c( "First name of individual", "First name of individual" ), columnType = c("string", "string") ) verify_dictionary_structure(dat) # Invalid -- throws error due to descriptions of first_name dat <- data.frame( key = c("first_name", "first_name"), description = c( "First name of individual", "Last name of individual" ), columnType = c("string", "string") ) verify_dictionary_structure(dat) }