View source: R/schema_source.R
schema_source | R Documentation |
The functions parses table schema (from database) and saves its structure yaml format. The defined structure is then used to prepare schema dependency graph, that is:
dependencies between tablesBased on foreign key definitions
inner table column dependenciesBased on defined dependencies by various methods. See vignette('todo')
.
schema_source( source, schema = "public", file = if (is.character(source)) source else file.path(getwd(), "schema.yml"), faker_opts = getOption("dfkr_options", default_faker_opts) )
source |
Connection to Redshift or Postgres database or path to YAML configuration file
from which schema metadata should be sourced.
When missing |
schema |
Schema name from which the structure should be sourced. |
file |
Path to yaml file describing database schema, or target file when schema should be saved
(when |
faker_opts |
Structure sourcing and columns simulation config. |
Detected dependencies are then saved in R6Class object that is returned and possible to pass for further methods. See schema_methods.
Keeping the schema as a graph allows to perform simulation process in proper order, preserving table dependencies and constraints.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.