whylogs.app.writers
Classes for writing whylogs output
#
Writer ObjectsClass for writing to disk
#
Parametersoutput_path : str
Prefix of where to output files. A directory for type = 'local'
,
or key prefix for type = 's3'
formats : list
All output formats.
See :data:whylogs.app.config.ALL_SUPPORTED_FORMATS
path_template : str, optional
Templatized path output using standard python string templates.
Variables are accessed via $identifier or ${identifier}.
See :func:Writer.template_params
for a list of available identifers.
Default = :data:DEFAULT_PATH_TEMPLATE
filename_template : str, optional
Templatized output filename using standardized python string templates.
Variables are accessed via $identifier or ${identifier}.
See :func:Writer.template_params
for a list of available identifers.
Default = :data:DEFAULT_FILENAME_TEMPLATE
#
writeAbstract method to write a dataset profile to disk. Must be implemented
#
path_suffixGenerate a path string for an output path from a dataset profile by
applying the path templating defined in self.path_template
#
file_nameFor a given DatasetProfile, generate an output filename based on the
templating defined in self.filename_template
#
template_paramsReturn a dictionary of dataset profile metadata which can be used for generating templatized variables or paths.
#
Parametersprofile : DatasetProfile The dataset profile
#
Returnsparams : dict Variables which can be substituted into a template string.
#
NotesTemplate params:
name
: name of the datasetsession_timestamp
: session time in UTC epoch millisecondsdataset_timestamp
: timestamp for the data in UTC epoch mssession_id
: Unique identifier for the session
#
LocalWriter Objectswhylogs Writer class that can write to disk.
See :class:Writer
for a description of arguments
#
writeWrite a dataset profile to disk
#
ensure_pathEnsure that a path exists, creating it if not
#
S3Writer Objectswhylogs Writer class that can write to S3.
See :class:Writer
for a description of arguments
#
writeWrite a dataset profile to S3
#
writer_from_configConstruct a whylogs Writer
from a WriterConfig
#
Returnswriter : Writer whylogs writer