1. Import table

    Article: AN0002449Updated: 26.05.2021

    There is a temporary database table created during import of data into ObjectGears, which is used to read data from the input file and to transform text values to the corresponding data types in the target class, into which we want to import. We can modify the imported data by means of scripts that we can execute in various import phases.

    The import table is in ObjectGears automatically created for each particular import run. This table is temporary in the default set up and it is deleted after the import finishes. However, we can uncheck the option Delete import table and leave it in the database. In such a case we can work with the import table data also after the import finishes. User should secure final deletion of such tables in order that they do not accumulate in the database when this option is used.

    Name of the import table

    Each import table has a unique name within ObjectGears instance. The name has this format: "tmp_import_" + ImportRun.Id - e.g. tmp_import_2095.

    The script which is executed during import can refer to the object OGActualImportDbTable, which contains name of the import table for the given import run.

    Structure of the import table

    The import table contains following columns:

    Column name Description
    Id Id of the record in the import table.
    IsError Indication, whether the record is valid (=0) or erroneous (=1).
    DataRowId Id of the corresponding record in the import table.
    ArchiveInUpdate Internal indication, whether the record shall be archived.
    LastChildDataRowId Id of the corresponding record of the last child of the import class (in case that the import class has child classes).
    IgnoreRow Internal indication.
    col_xxx_s (where xxx is Id of columns in the import class) Imported value from the input file.
    col_xxx_d (where xxx is Id of columns in the import class) Value converted to the data type corresponding to a column in the import class.


    Examples of working with import table can be found in articles Indication of record presence in the import and Correction of imported data.