Import Data

The Import Data feature allows you to import external data into the application. You identify and map the external source data to the appropriate Shop Floor Time table using an Import Definition. Once you configure the import and associate the source data with context names, the source data is imported when you run the IMPORT_FILES service. The service reads data from the applicable source data and converts it to XML records in the application. The raw XML records can be viewed on the In XML Queue Detail form. The service also populates the tables that apply to the Context Names you define. For example, when source data is mapped to the PERSON context, the IMPORT_FILES service imports the data and populates the person table.

Note: Action imports are only supported in STARTSTOP prompting mode.

To configure and run an import you must complete the following:

  1. Create an Import Name and identify the source data on the Import Source form.

  2. Associate the source data with one or more context names on the Destination Records tab.

  3. Map the source data to specific context field names on the Source Fields tab. You can also assign static data to specific context field names on the Record Value Map tab.

  4. Select the Import Name you created in Step 1 above and press the Schedule Immediately button in the Import Definition form. This will cause the IMPORT_FILES service to run.

To configure the IMPORT_FILES service to run the Import Name in the future:

  1. Select the IMPORT_FILES Service on the Service Instance form.

  2. Navigate to the Service Parameters tab and move the Import Name you created in Step 1 from the Available box to the Selected box.

  3. Click Save.

  4. The IMPORT_FILES service will now include the Import Name anytime the service runs via a Service Schedule or the Service Monitor form.

See Also:

License Requirements

Import Definition Forms

Import Contexts and Mandatory Fields

Interface Mapping (doc-INTERFACE-events-AUTOTIME)

IMPORT_FILES Service

How the System Reads and Imports Source Data

Disable Quantity Updates in Charge Element Imports

 

License Requirements

This feature requires the following:

To check if the module is included in your license and enabled:

  1. Click Main Menu > Configuration > System > Licensing.

  2. On the License Modules tab, select the Module Name called Import Data.

  3. The following boxes must be checked: Licensed and Module Enabled.

 

Import Definition Forms

From the Import Definition form, you can access the forms listed in the table below.

Form Name

Description

Import Source

The Import Source form is used to create Import Names and identify the source data that can be imported via the IMPORT_FILES service. To open this form, click the Import Name quick link.

Creating the Import Source is the first step in the Import Data Feature. Once you identify the Import Source, you associate the source data with the context and Field Names on the Import Definition form.

Destination Records

The Destination Records tab is used to associate source data with Context Names (i.e., Transaction Names) for the purpose of importing external flat file data, converting it into XML files and populating the tables the context names are associated with. For example, the Context Name PERSON is associated with the person table (i.e., Employee form).

Once you identify the Context Name you want to use, you must use the Source Fields tab to identify how the field names will be populated. See Import Context Names for a list of the mandatory fields that must be included in the import based its context.

Record Value Map

The Record Value Map tab applies to Destination Records. It is used to assign a value to a context field name. This means that source data will not be used to populate the field names you indicate. Instead, the IMPORT_FILES service will apply the value to the context field when it creates the new context records.

Source Fields

The Source Fields tab is used to associate source data with specific field names that belong to the tables that are associated with the record names you select.

Each context has a set of destination field names that you can associate the source data with. See Import Context Names for a list of the mandatory fields that must be included in the import based its context.

Field Map

The Field Map applies to Source Fields. The Field Map tab is used to associate source data with more than one field name.

Field Format

The Field Format tab applies to Source Fields. It is used to format source data before it is converted to XML via the IMPORT_FILES service. A source field can have 0 or more formats. The format listed first on the Field Format tab is applied first.

Field Translation

The Field Translation tab applies to Source Fields. It allows you to identify specific values in the source data that can be translated/converted to the value you specify in the Destination Value field. When the data is imported, the identified source values will be converted to the destination values. The destination value will display in the output data.

 

IMPORT_FILES Service

The IMPORT_FILES service imports source data, converts it to XML, and populates the tables associated with the selected context names. The raw XML records can be viewed on the In XML Queue Detail form. The service populates the tables that apply to the Context Names you defined. For example, when source data is mapped to the PERSON context, the service imports the data and populates the person table. The parameters for the IMPORT_FILES service can be viewed/modified on the Service Parameters tab on the Service Instance form.

Once enabled, you can run the IMPORT_FILES service in any of the following ways:

  1. Run the service immediately by pressing the Schedule Immediately button on the Import Definition form. The service will run for the selected Import Name in the Import Name field. The service can only run for one Import Name via the Schedule Immediately button.

  2. Run the service immediately via the Service Monitor form. The service will run for all the enabled Import Names you have selected to run in the service parameters for the IMPORT_FILES service.

  3. Schedule the service to run on a regular basis via the Service Schedule form. The service will run for all the enabled Import Names you have selected to run in the service parameters for the IMPORT_FILES service.

 

How the System Reads and Imports Source Data

If the Import type is FIXED

The IMPORT_FILES service will import the data located at the beginning of the source file and continue until the character field has been filled according to the Fixed Length field in the first Source File record. The specific source data will populate the Field Names associated with the Source File record. If a second Source File record exists, the service will import data starting with the next available character and continue until the character field has been filled according to the Fixed Length field in the second Source File record. The service will continue with this sequence for all the Source Fields records using the same Import Name. Once the service has populated the associated Field Names, it will repeat the process for the second row of data in the source data file.

Note: If you have configured lines to be skipped the service will start reading data after skipping the number of lines you indicated.

If the import type is CSV

The IMPORT_FILES service will import the data that is listed before the first instance of the character separator in the first row of the source file. If you have configured lines to be skipped the service will start reading data after skipping the number of lines you indicated. The service will populate the field names associated with the first Source Field record. If a second Source Field records exist, the service will import the data located between the first and second instance of the separator and populate the field names associated with the second Source Field record. The service will continue with this sequence for all the Source Fields records using the same Import Name. Once the service has populated the associated Field Names, it will repeat the process for the second row of data in the source data file.

Service Status

You can view the status of the service on the Service Monitor form. You can view the Raw XML data on the In XML Queue Detail form. The service will import data according to the configured records on the Import definition form.

Action Imports

If you are importing action records (transactions with event name, badge number, timestamp, order number, operation number, etc.), these records must include start and stop prompts (STARTSTOP prompting mode). If the action records were collected in STARTSTART or STOPSTOP mode, the records will not be imported.