Reads profile.yaml from dir when it exists, and builds a
SyntheticTable whose datasets live in dir.
Arguments
- dir
The directory of the table. It holds
profile.yaml(optional),datasets.yamlandhandmade/<name>.csv.- name
The name of the table.
- field_types
A named character vector of csdb field types.
- keys
A character vector of key column names, or
NULL.- ...
Other arguments to
SyntheticTable$new(), such asvalidator_field_contents,invariantsorgenerator. Do not giveprofileordir.
Examples
dir <- tempfile()
dir.create(dir)
st <- synthetic_table_from_dir(dir, "people", c(id = "INTEGER"), "id")
st$list_datasets()
#> Empty data.table (0 rows and 5 cols): name,kind,n,seed,description
