Source: factory.core/ObjDataExport.py
Manages data export processes, extending
ObjSupervisor.Supervisor.
This class handles the rendering of reports, initializes factory objects
for specific export types, cleans up old reports, and processes data exports
based on various parameters and configurations.
| Method | Signature | Description |
|---|---|---|
| render_report | render_report() -> bool |
Renders a report, processes its content, and writes it to a file. |
| load_factory_object | load_factory_object() -> None |
Dynamically loads and initializes an exporter object based on _Exporttype. |
| process_report_clean | process_report_clean() -> None |
Cleans up old report files from the export directory. |
| process_report | process_report(guid: str, report_code: str, export_type: str = 'csvprocess', compress: str = '', param1: str = '', param2: str = '', param3: str = '') -> str |
Processes and generates a report based on the provided parameters. |
| process | process(guid: str, data_export_code: str) -> str |
Initiates and manages a data export process based on a given data export code. |
| update_tracking | update_tracking() -> None |
Logs the details of the completed data export to the track_import table. |
| get_query_results | get_query_results(query: str) -> tuple[list, list] |
Executes a SQL query and returns the results along with column headers. |
| render_query | render_query(query: str) -> bool |
Executes a SQL query, processes its results, and writes them to a file. |
| update_stage | update_stage(success: bool) -> None |
Updates the status of a staged data export record. |
Manages sets of data export operations, extending
ObjSupervisor.Supervisor.
This class is responsible for reading and processing staged data exports,
launching the data export service, and managing microservices related to exports.
It orchestrates the execution of individual ObjDataExport processes.
| Method | Signature | Description |
|---|---|---|
| read | read(guid: str, checkout_name: str) -> None |
Reads and processes a set of staged data exports. |
| launch_service | launch_service(thread_count: int | str) -> None |
Launches the data export service, either as a threaded or single instance. |
| micro_service | micro_service(thread_count: str = '') -> None |
Runs the data export microservice. |
Runs a direct data export for a given export code.
Runs a report export for a given report code.
Starts the main data export service.
Starts the data export service in singleton mode.
Reads and processes a staged data export by GUID and optional checkout name.
Creates tables defined in a YAML schema file (inferred from class/module name).