NOTICE: All information contained herein is, and remains
the property of TechnoCore Automate.
Updated : 2026-03-16
ObjServiceImportParser is a FullHouse-specific CSV file import
service. It reads parser configurations from def_service_parser,
scans directories for matching files, extracts parameters from
filenames, parses CSV rows, and bulk-inserts into dynamically
created database tables.
Uses a staging table (_sync suffix) with REPLACE INTO for
idempotent imports. Tracks processed files in
track_service_parser to avoid reprocessing. Moves completed
files to a /done/ subdirectory.
1. Read parser config from def_service_parser
2. Connect to remote DB if configured
3. Execute PreSQL (if any)
4. Create target + staging tables if missing
5. For each matching file:
a. Check track_service_parser (skip if done)
b. Extract params from filename pattern
c. Parse CSV into staging table (10k row batches)
d. REPLACE INTO main table from staging
e. Track in track_service_parser
f. Move file to /done/
6. Execute PostSQL (if any)
Filenames can contain embedded parameters extracted via patterns:
Pattern: HP_{table:20}_{date:8}.csv
Filename: HP_TRANSACTION_HEADER_20250907.csv
Result: table=TRANSACTION_HEADER, date=20250907
Format: {param_name:length} — length is optional (0 = until
next delimiter).
| Column | Description |
|---|---|
| ServiceCode | Parser identifier (e.g. TRADERUNI) |
| InputTable | Target table name |
| BaseDir | Directory to scan |
| FileFilter | Glob pattern (e.g. HP_*.csv) |
| FileParams | Filename parameter pattern |
| HeaderFields | Comma-separated column names |
| HeaderSkipLines | Lines to skip before data |
| FileSeparator | Delimiter (,, t/tab for tab) |
| remote_connection | Remote DB connection name |
| PreSql | SQL to run before import |
| PostSql | SQL to run after import |
| Command | Context Keys | Result Key |
|---|---|---|
scan |
service_code |
_importparser_result |
# Run import for default service code
python ObjServiceImportParser.py scan
# Run for a specific service code
python ObjServiceImportParser.py scan TRADERUNI
from ObjServiceImportParser import ObjServiceApi
svc = ObjServiceApi()
lines = svc.scan_input("TRADERUNI")
print(f"Imported {lines} lines")
Updated : 2026-03-16
cythonize -3 -a -i ObjServiceImportParser.py
Compiling /home/axion/projects/axion/factory.service/package.fullhouse/ObjServiceImportParser.py because it changed..[1/1] Cythonizing /home/axion/projects/axion/factory.service/package.fullhouse/ObjServiceImportParser.py
Updated : 2026-03-16