Read a pointblank YAML file to create an informant object
Source:R/yaml_read_informant.R
yaml_read_informant.Rd
With yaml_read_informant()
we can read a pointblank YAML file that
describes table information (typically generated by the yaml_write()
function. What's returned is a new informant object with the information
intact. The informant object can be given more information through use of
the info_*()
functions.
Examples
There's a YAML file available in the pointblank package that's called
"informant-small_table.yml"
. The path for it can be accessed through
system.file()
:
yml_file_path <-
system.file(
"yaml", "informant-small_table.yml",
package = "pointblank"
)
The YAML file can be read as an informant by using the
yaml_read_informant()
function.
informant <- yaml_read_informant(filename = yml_file_path)
informant
As can be seen from the information report, the available table metadata was
restored and reported. If you expect metadata to change with time, it might
be beneficial to use incorporate()
to query the target table. Or, we can
perform this querying directly from the YAML file with
yaml_informant_incorporate()
.
See also
Other pointblank YAML:
yaml_agent_interrogate()
,
yaml_agent_show_exprs()
,
yaml_agent_string()
,
yaml_exec()
,
yaml_informant_incorporate()
,
yaml_read_agent()
,
yaml_write()