Getting started - Data Import

From Catalyst
Revision as of 16:06, 17 October 2013 by Richard Green (talk | contribs) (Template Code)
Jump to: navigation, search

Summary

The following article explains how to create a data import template so that you are able to import information from plain text files into the system.


More Information

What is a Template?

A template tells Platinum:

  • What information you want to import.
  • Which part of the system you want to import data into e.g. the "Stock File", the "Vehicle Stock File", the "Accounts Transaction File" etc.
  • Where the file is that holds the data you are importing.
  • Which fields within the chosen system you are importing data into e.g. "Stock Code" field, "Stock Description" field, "Account Name" etc.

Process

Go to " Data Import".

This will take you to a screen where you can search for existing Data Import templates or create a new one.

Template Code

Each template should have a unique code
'001' or 'STO' (max. 3 character)
.
  • Enter a code for the template and press <Enter>.
  • Type a description for the template e.g. 'Stock File Import'.

Destination

The Destination is the file you want to import data into. Click here to view a list of possible destinations.
  • Press <Shift+F2> to view a list of destinations then press the <Up Arrow>/<Down Arrow> key to scroll through the list and press <F2> to select the desired one.
  • Alternatively type in the destination file code.

Source File

The Source File is the file containing the data you wish to import. Your Source file will usually contain a series of records. A record is each line or lines of information relating to the same Stock Code, Vehicle, Account etc. The Data Import program can read most Plain Text files e.g. '.CSV' (Comma Separated Variable) files and '.TXT' (Text) files.
  • Enter the name of, and if necessary the Path to, the file which holds the data to be imported
'C:\STOCKFILE.CSV'.
  • If you need to find a file, press <Ctrl+F1> and search for the file using the explorer window.

Press <Enter> to move to the template import configuration.

Variables

A variable tells the system which field to look at e.g. there is a variable for the Stock Code field, the Account Code field, the Vehicle Model field etc. Each field within a Destination File, into which you can import data, has a variable. The actual variable code will vary depending on the Destination File so for further information on Variables available for each Destination File click.
  • Select a variable by typing in the variable number or:
    • Press <F1> or <Shift+F1> to cycle through the possible fields you can import into in the chosen destination file.
    • Alternatively press <F2> to view a list of the available fields, use the <Up Arrow>/<Down Arrow> key to browse the list and press <F2> to select the variable.

Press <Enter> to move to the options column.

Options

You will find some variables have various letters and numbers in brackets alongside them, these are known as "options". "Options" are available when you have a choice over where the data is imported on a single variable. For example when importing addresses into the Account Address File, 'LDAD', variable 18, Account Address, options 1-5 are available to define into which line of the address you want to import.

Expression

The "Expression" is how you tell the system whereabouts in the source file it will find the required data and how it should be handled. The first part of the expression defines whether the imported data is text or numeric. 'ST' denotes that the data is to be text or a combination of text and numeric characters. 'NU' denotes that the imported data will be just numeric. It is important to specify the correct data type when importing to avoid errors - if you are unsure of what the type should be, the "Type" field will show a 'T' for text or 'N' for numeric.

The most common files you will import from are of a delimited format where each value is separated using a delimiter character. The most commonly occurring of these is a '.CSV' file.

To import text values from a '.CSV' file, the following expression will be used :

 ST{1(,)}

This example will import the text string from column 1 of the source file where ',' is the delimiter character.

To import numeric values from a '.CSV' file, the following expression will be used :

NU{2(,)}

This example will import the numeric string from column 2 of the source file where ',' is the delimiter character.

Further Information

Do be careful to check your template before you use it. It is worth taking ten lines out of your source file, creating a separate file and using this to check that everything is going to the correct place. It can save you an awful lot of bother if your template is not quite right.

See also


Feedback
Thank you for using our Knowledge Base, we value your feedback. Did you find this article useful? 'Yes' or 'No'
Keywords AND Misspellings
Get, start, Getting, Started, Getting Started, DATA, IMPORT, CREATE, CREATING