2017 R1

Import and Update of DataPermanent link for this heading

For importing or updating of data a Data Import object has to be created and configured (for more information, see chapter “Configuration of the Data Import”.)

Manual ImportPermanent link for this heading

To start the import, use the context menu command “Import Data“ of a data import object.

The import progress is displayed in an own window.

If during an import process no objects can be created anymore because e.g. the server goes down, read records are not lost. The data are written to a log file and the import process can be continued at a later date (context menu command “Roll Forward”).

Note: When importing data from Microsoft Office Excel to Fabasoft Folio, the files have to be closed that the import process can be processed successfully. Attention: If files are open, no error message is displayed.

Programmatical ImportPermanent link for this heading

For programmatical import (e.g. via script) the action Remote-controlled Import (FSCCOLD@1.1001:ImportRemote) is available with the following parameters:

  • Showdialog
    Use this parameter to determine whether the progress dialog is displayed.
  • closedialog
    Use this parameter to determine whether the progress dialog is closed at the end of the import without confirmation.
  • reportcreatedobjects
    If this parameter is set to TRUE and the parameter asynchron is set to FALSE, the created objects are returned in the createdobjects parameter.
  • createdobjects
    In this parameter the created objects can be returned.
  • rollforward
    Use this parameter to determine whether an abortes import process is continued.
  • asynchron
    If this parameter is set to TRUE, the import takes places in the background.
    Note: FALSE is only suitable for a small number of objects, because the client cache can not be cleaned up in this case.
  • paramobject
    This parameter can contain any COM object.
  • finishedscript
    This parameter can contain a content that is called as a script at the end of the import process.
  • synchobj
    If the asynchrony parameter is TRUE, in synchobj a COM object is returned.
    The COM object is not registered and therefore cannot be created explicitely. It implements  IDispatch and makes available the following functions:
    • Wait()
      Waits for the end of the import.
    • IsFinished()
      Returns TRUE if the import is finished, otherwise FALSE.
    • Cancel()
      Cancels the import.

ExamplePermanent link for this heading

In this section basis of a very simple, concrete example, all steps of a data import are demonstrated.

Initial SituationPermanent link for this heading

Organizations and their employees shall be imported. Exemplary the following data are available:

Organization:

  • Name
  • Branch of industry

Person:

  • Last name
  • First name
  • E-mail address

Employee:

  • Relation between organization and person (m:n Relation)

The following Microsoft SQL server tables can be produced in the data base “migration“:

Organization

Content:

Person

Content:

Employee

Content:

ProcedurePermanent link for this heading

To be able to access the data, the OLE-DB interface is used and for that an UDL file is created (see chapter ”OLE DB“). As provider, in the properties of the UDL file (“Provider” tab) select the “Microsoft OLE DB Provider for SQL Server”. On the “Connection” tab select the relevant Microsoft SQL server, enter the connection information and specify the data base.

In the Fabasoft Folio domain, create a Data Import object for each table of the data base (Organization, Person and Employee).

Organizations

The organizations are imported first.

For each object property to be set an entry in the Mapping field is necessary. For unique identification, the ID is assigned to the property External Key (COOSYSTEM@1.1:objexternalkey) that is part of each object. The name is used as object name.

The property for the branch of industry needs a term object. Therefore to steps are necessary. First, in the Mapping field, for the branch select the object class FSCTERM@1.1001:Term, select the Property Name and determine to use it as a “Key” (for each branch the same object is used). Second, in the Object Relations field, assign the term to the property Industry of the organization.

In this example no further values are specified in the table.

To avoid duplicate organization objects, in Class Properties select “Check by Query for Each Object“ for object class (FSCFOLIO@1.1001:Organisation).

Result (Based on the data of chapter Initial Situation”)

Persons

For each object property to be set an entry in the Mapping field is necessary. For unique identification, the ID is assigned to the property External Key (COOSYSTEM@1.1:objexternalkey) that is part of each object. For surname and first name two further entries have to be created.

For the e-mail address, two things have to be considered:

The property E-Mail Addresses (COOMAPI@1.1:emailinformation) is an aggregate. The single parts of the compound property can be addressed by a property path. To avoid duplicate entries (during multiple imports) the e-mail address is used as aggregate key (option “Aggregate Key”). Additionally select the option “Must Be Defined in Aggragate“ to avoid entries when there is no e-mail address.

As address topic three terms (FSCTERM@1.1001:TermComponentObject, “E-Mail 1”, “E-Mail 2”, “E-Mail 3”) are available. Our e-mail addresses get the topic “E-Mail 1”. In the Mapping field, for object class FSCTERM@1.1001:TermComponentObject, select the Property Address (COOSYSTEM@1.1:objaddress) and as value type the object address of the desired term. In the Object Relations field, assign the term object to the property path “E-Mail Adresses.Topic” of Persons.

Result (Based on the data of chapter Initial Situation”)

Relations

The relation between persons and organizations is created through a further import. Therefore the property External Key of Organizations and Persons is used. To avoid double entries of persons in organizations, in the Object Relations field use the option “Unique Entries in List”. In the Class Properties field is defined, that objects that do not exist yet are not created.

Result (Based on the data of chapter Initial Situation”)

The next chapter gives an example for a file import.