1. Imports into columns of the reference type

    Artikel: AN0001890Aktualisiert:
    Die vorgegebene Sprachenversion vom Artikeltext wird angezeigt, weil es kein Text von der ausgewählten Sprache und Version gibt.

    If there is reference into another class instead of a real value used in the class, to which we import, it is necessary to look up the value in another class and within the import save Id of the referred record into the column of the reference type. This can be done by several ways:

    Imports of references lokked up according to one column

    We will use combobox „Mapping column” that is shown by all columns referring to another class and choose, in which column from the referred class, the value from the file should be looked up. Id of the referred record will then be saved into the imported class within import.

    Imports of references looked up according to more columns

    We will check off option „Map the imported value”, select the referred class and columns according to which the referred record shall be identified.

    We will choose Id in the control „Mapping column”.

    Imports of references looked up in another class

    If we want to look up in a child class but we refer to a parent class or we look up in another class than is the referred class, we will check off the option „Map the imported value”, choose the class, in which we want to look up, and select column, value from which we want to save. In this case we select Id in the control „Mapping column”.

    It can also happen that we will not choose column with Id as a Return column, but e.g. column with a short text. In the control „Mapping column” we will then select from columns with the short text in the imported class.

    Imports with a complex look up

    If we need to look up in more classes (hierarchy of reference classes) to identify the reference, we will check off the option „Map the imported value” and select previously prepared query, in which we will look up. The query enables to consolidate data from more classes and realize a more complex logic of looking up. After unpacking query columns we proceed like in the previous case.

    Imports into reference class before import into import class

    Before import into the import class, that is referring into another class, it is necessary to make sure that there are all the records necessary to set references. There is option „Import unique records” in the section „Import type” that is used to add new references into a reference class.

    Example:

    We have a file of the following structure:

    Server                  Domain              Patch                    Patch description                                          

    PRG215               ObjectGears.cz    KB2503665          Security Update for Windows Server 2008 R2 x64 Edition (KB2503665)

    PRG215               ObjectGears.cz    KB2536275          Security Update for Windows Server 2008 R2 x64 Edition (KB2536275)

    PRG215               ObjectGears.cz    KB2529073          Update for Windows Server 2008 R2 x64 Edition (KB2529073)

    PRG217               ObjectGears.cz    KB2503665          Security Update for Windows Server 2008 R2 x64 Edition (KB2503665)

    PRG217               ObjectGears.cz    KB2536275          Security Update for Windows Server 2008 R2 x64 Edition (KB2536275)

    PRG217               ObjectGears.cz    KB2529073          Update for Windows Server 2008 R2 x64 Edition (KB2529073)

    We need to import into the class containing server, domain and reference to a patch. Before the import it is necessary to make sure that the referred class Patch containes all the patches present in the import file. This is why we will carry out import from the columns Patch and Patch description into this referred class  first. However, since there are duplicates in patches (same patches were found by various servers), we will check off option „Import unique records”. This will cause:

    1. Unique combination of values from columns marked for mapping will be selected.
    2. The first found value will be selected by columns marked for import but not for mapping.
    3. Only those records, for which combination of values from columns marked for mapping does not exist in the class yet, will added to the class.

    In this way necessary reference class update will be carried out without creation of duplicates.

    Imports modified by executing scripts

    Scripts, that can modify import data or perform complex mapping, can be executed within particular import  import phases. These script can work e.g. with table temp_import_X, where X is a unique number of each import start. Script execution can be set in the import detail.

×