tests/testthat/test_get_fields.R

# Make sure no new field types have been added to the registry

known_fields <- c("character", "integer", "field", "boolean", "datetime",
                  "numeric", "url")

endpoint <- Sys.getenv("FDP_endpoint")

tables <- get_tables(endpoint = endpoint) %>%
  setdiff(c("users", "groups"))
fields <- lapply(tables, function(x) {
  get_fields(x) %>%
    dplyr::filter(read_only == "FALSE") %>%
    dplyr::select(data_type)}) %>%
  unlist() %>%
  unique()

Try the rDataPipeline package in your browser

Any scripts or data that you put into this service are public.

rDataPipeline documentation built on Nov. 18, 2021, 1:14 a.m.