Read a pointblank YAML file to create an informant object
Read a pointblank YAML file to create an informant object
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.
yaml_read_informant(filename, path =NULL)
Arguments
filename: File name
scalar<character> // required
The name of the YAML file that contains fields related to an informant.
path: File path
scalar<character> // default:NULL (optional)
An optional path to the YAML file (combined with filename).
Returns
A ptblank_informant object.
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():
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().
Function ID
11-3
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()