WriterDispatcher
- class pyprophet.io.dispatcher.WriterDispatcher[source]
Bases:
objectDispatcher class to route I/O configuration to the appropriate writer implementation.
Based on the file_type and optionally the config context, this class instantiates and returns the correct writer (e.g., OSWWriter, ParquetWriter, SplitParquetWriter).
Supported file types: - “osw” - “parquet” - “parquet_split” - “parquet_split_multi” - “tsv”
- __weakref__
list of weak references to the object (if defined)
- static get_writer(config)[source]
Return the appropriate writer instance based on the config’s file_type and context.
- Parameters:
config (BaseIOConfig) – Configuration object with file_type, level, and context.
- Returns:
An instance of a subclass of BaseWriter suitable for the given output type.
- Return type:
- Raises:
ValueError – If an unsupported file type is provided.