Kourier Integrator Online Help

File to U2 Import Specification

Purpose

This page is used to define data File to U2 Import Specifications, which are used to import data from an external file in various formats (other than XML), and then load the data into a U2 file. Contact Kore Technologies if you have additional questions on this advanced feature.

A File to U2 Import Specification has two parts: target file options (qualification, event handlers and import process, etc.) and the import target field mapping. The import filed mapping lists the fields to be included in the data import file, the column headings to use, data conversions, etc. 

Here's the typical workflow when creating a File to U2 Import Specification:

  1. Create an Import and add one or more line items to define the target import field mapping to the source file.
  2. Use the Test command without the Write to Disk option to verify the import mapping and conversions are working correctly.
  3. Use the Test command with the Write to Disk option to do a final verification that the import is writing to the target file correctly.
  4. An import is typically automated and processed as part of a Kourier Service using the command KMK.IMPORT.

Available Toolbar Commands

Click the New icon in the toolbar to save the current import specification and then reset the page for new data entry.

Click the Save icon in the toolbar to save the current import specification and return to the import specifications listing.

Click the Save and Stay icon in the toolbar to save the current import specification and continue working. 

Click the Save As icon in the toolbar to save the current import specification to a new name. You will be prompted to enter a new name. Click OK to save the import to a new name and then continue editing the import. Click Cancel to return to the existing import without saving.

Click the Delete icon in the toolbar to delete the current import specification. You will be prompted with a "Are you sure you want to delete?" dialog. Clicking Yes will permanently delete the import and then return to the import specifications listing. Click Cancel to return to the existing import without deleting.

Click the Test icon in the toolbar to test an import. Testing an import will perform a sample data import from a test file using all of the information entered on the import specification and then outputs the results to the screen where it can be viewed and validated. Typically a test is performed to ensure that the correct data fields are being imported and all data conversions, formats, and formulas are working correctly.

After clicking the Test icon, you will see a dialog requesting additional information:

  • Commit Mode: Select one of the options (Insert, Update, Delete, Upsert) to use in the test.
  • File Name: Browse for the file to use with the test.
  • Transactions to sample: Enter the number of records to run through the test.
  • Write records to disk: Enable this checkbox when you are ready to actually write the data to the file as part of the test.

Click the Continue button to view the import results or click the Cancel button to return to the Import Specification page.

For this feature to work correctly you will need to: 1) Add the Kourier website as a trusted site so pop-up dialogs appear and 2) enable the automatic prompting for downloads option in your browser's internet options (e.g., for Internet Explorer this setting is found in Security | Custom Level dialog).  

 

To see the runtime statistics for an individual import, click the Statistics icon from the toolbar. This will take you to the Import Specifications Listing which displays all import statistics that have been captured for the import. 

Click the Help balloon to open the help for this page.

File/Key Field

KT_IMPORTS/Import Name

Prerequisites

Fields

Field Name

Description - Usage - Notes

Name

Enter a unique name for the import. By convention, imports are named using an Integration ID such as KS for KommerceServer, followed by an underscore and a string that describes its purpose (e.g., KS_CONTACTS). 

Title

Enter a short descriptive name for this import. This name is displayed in on-line lookups.

Supported Operations

An import is typically designed for specific types of transactions (Insert, Update and Delete), and using the supported operations allows you to indicate what types of transactions you want to allow and Kourier will manage this for you without you having to write any code to enforce the rule.

Select from the drop down list the type(s) of file time operations that can be performed by this Import Specification:

Operation

Usage

Inserts

Only new records can be created.

Updates

Only existing records can be updated.

Deletes

Only existing records can be deleted.

Inserts+Updates

New records can be created, and existing records can be updated.

Inserts+Deletes

New records can be created, and existing records can be deleted.

Inserts+Updates+Deletes

New records can be created, existing records can be updated, and existing records can be deleted.

Updates+Deletes

Existing records can be updated or deleted.

This may override any event handlers if the supported operations are inconsistent with the state of the record after it was read. For example: if after the record was read it is determined that it is a new record, and the Supported Operations do

Log Transactions

Enable the checkbox if you would like to enable transaction logging for this import specification. The default is normally true.

Notes

Enter a free form comment or note for this Import Specification. If a note is entered, a small icon will display on the Import Specification listing. Hovering your mouse over the icon will display about 40 characters of the note.

Source File Mask

This field is very important because it determines which files in the import "inbox" will be selected for processing. Enter a file mask that best describes the file names / pattern that you will be processing. You can use literals and wildcards the same as UniBasic does. Refer to the UniBasic operator "MATCHES" for more information.

If you had file names that follow a pattern such as: Location01.csv, Location999.csv, etc., you could use a file mask like this to select and process those files: "Location"0X".csv" where Location is a literal, 0X, and ".csv" is the literal file extension. 

Format

Enter the format of the import file to be processed:

Format

Description

CSV

Data values are delimited by the comma character.  If a data value is non-numeric it is enclosed by the double quote character. If a data value contains the double quote character it will be duplicated.

PIPE

Data values are enclosed in XML tags.

TAB

Data values are delimited by the tab character.  Use this format to generate files that can be automatically loaded in the Excel or other PC applications.

TILDE

Data values are delimited by the tilde character.

Text Qualifier

Select the text qualifier that best describes how text values or strings are identified within the file: None, Single Quote (') or Double Quote (").

First Row Contains Column Names

Enable this checkbox if your import file has a row at the beginning of the document that includes the column names. This will cause the first row to be skipped during processing.

Row Delimiter

Select the row delimiter that best describes rows are identified within the file:

  1. {CR}{LF}: Carriage return and Line Feed
  2. {CR}: Carriage return only
  3. {LF}: Line Feed only

Target File

Enter the name of the file that will be that will be updated with the imported data.

Event Handler

Select the Event Handler for which you want to view/edit and click the edit icon . Events that contain code will be displayed in angle brackets (e.g., <Before Read>).

Available Event Handlers are:

Each Event Handler has a specific timing and usage during an import, which is explained in the Import Specification Event Handlers topic. 

Line Item Fields

Click the add button in the line item section command bar to add a new line item field or click the Line number to edit an existing line item. For more information on each individual field, see the help for Import Specification Line Item

Related Topics: 

Import Specification Event Handlers

Kourier Import Processing Guide

Kourier Services

Kourier Import Processing Guide

Kourier Import Services Guide

File to U2 Import Specification Line Item