NOTICE: All information contained herein is, and remains
the property of TechnoCore Automate.
The ObjImportApi class in ObjDataImportSqlite.py imports data from SQLite
database files (.db, .sqlite). It follows the same open_file /
column_list / next_row / close_file interface used by all other
ObjDataImport* modules.
Uses the Python standard library sqlite3 module. All rows from the target
table are read into memory on open_file.
prep_file(filename) -> strNo-op — returns the filename unchanged.
open_file(filename)Opens the SQLite database file and reads all rows from a single table. The
table name is determined by:
self.parent._Sourcetable if set (the parent import object specifies whichsqlite_master.Column names are taken from cursor.description.
close_file()Closes the SQLite connection and releases the in-memory record list.
column_list() -> listReturns the column names from the SQLite table.
next_row() -> list | strReturns the next record as a list of values in column order. Returns "EOF"
when all records have been read.
importer = ObjImportApi()
importer.open_file("database.db")
columns = importer.column_list()
print("Columns:", columns)
while True:
row = importer.next_row()
if row == "EOF":
break
print(dict(zip(columns, row)))
importer.close_file()
To read a specific table, set the table name on the parent import object:
importer = ObjImportApi()
importer.parent = parent_import # parent._Sourcetable = "customers"
importer.open_file("database.db")
Updated: 2026-03-22