NOTICE: All information contained herein is, and remains
the property of TechnoCore Automate.
Export coordinator for the dataexport service. Dynamically loads a
format-specific exporter from factory.export/ and drives it through
the standard OpenFile → WriteHeader → WriteData → CloseFile lifecycle.
Orchestrates a single data export job. Attributes are populated either
in __init__ (with safe defaults) or by sql_read_object() reading the
def_dataexport table row for the requested export code.
Key attributes
| Attribute | Default | Purpose |
|---|---|---|
_Exporttype |
"" |
Maps to ObjDataExport{type}.py in factory.export/ |
_Filename |
"" |
Output file name; $date$ / $datetime$ placeholders are expanded |
_Directory |
"" |
Output directory; created automatically if missing |
_Query |
"" |
SQL to execute; takes priority over _Tablename and _ReportCode |
_Tablename |
"" |
Fallback: SELECT * FROM {table} |
_ReportCode |
"" |
Fallback: renders an HTML report |
_Remote |
"" |
Optional remote DB connection name for query execution |
_Remoteftp |
"" |
FTP connection name; file is uploaded after export if set |
_Compress |
"" |
Set to "Y" to zip the output with 7z |
_Delimiter |
"," |
Passed to the exporter (used by CSV-like formats) |
_Quotechar |
'"' |
Passed to the exporter |
Methods
process(guid, data_export_code) — top-level entry point; readsrender_query, render_query (table), orrender_report as appropriate, handles compression and FTP upload,render_query(query) — executes SQL, writes result to file via therender_report() — processes a report code via process_text andload_factory_object() — scans factory.export/ for a module namedObjDataExport{exporttype}.py (case-insensitive), imports it, andObjExportApi. Checks .py, .so, and .pydprocess_report(guid, report_code, export_type, ...) — conveniencereport CLI command).update_stage(success) — writes DONE / FAIL tostage_dataexport for the current _Stageguid.update_tracking() — inserts a row into track_import recordingReads a batch of staged exports from stage_dataexport and dispatches
each to an ObjDataExport instance. Also acts as the microservice
entry point.
| Enum | Source | Used for |
|---|---|---|
WorkflowNodeResultStatus.DONE / FAIL |
ObjEnum |
Stage status written to stage_dataexport |
DeploymentEnvironment.LIVE |
ObjEnum |
Gate for FTP upload (get_deployment() check) |
YesNo.YES |
ObjEnum |
Compress flag ("Y" stored in def_dataexport.Compress) |
factory.export/ObjDataExport{type}.py with classObjExportApi(ObjDataExportBase.ObjExportBase) implementing:OpenFile, CloseFile, WriteHeader, WriteData, EscapeCSV,DefaultExtension.# Run a direct export by code
python factory.core/ObjDataExport.py direct MY_EXPORT_CODE
# Run a report export
python factory.core/ObjDataExport.py report MY_REPORT_CODE
# Start the service
python factory.core/ObjDataExport.py service
# Start in singleton mode
python factory.core/ObjDataExport.py singleton
# Process a staged export by GUID
python factory.core/ObjDataExport.py read <guid>
# Create/migrate tables
python factory.core/ObjDataExport.py create-tables
| Table | Purpose |
|---|---|
def_dataexport |
Export job definitions |
stage_dataexport |
Queued export requests |
track_import |
Completed export audit log |
cythonize -3 -a -i ObjDataExport.py
Compiling /home/axion/projects/axion/factory.core/ObjDataExport.py because it changed..[1/1] Cythonizing /home/axion/projects/axion/factory.core/ObjDataExport.py
Updated : 2026-03-13