+1-757-461-3022 x124

Tutorial: Using CSVimp to import records

Overview

The CSVimp tool is designed to provide a graphical way to map and migrate data stored in Comma Separated Value (CSV) format into a PostgreSQL database. Any office spreadsheet application should be able to save data in CSV format.

The CSVimp tool may be downloaded from the xTuple download section or from xTuple downloads on SourceForge.net. The basic steps to importing a CSV file with this tool are:

  • Create the CSV file
  • Define the Mappings
  • Load the CSV file into CSV Imp
  • Run the Import

Example: Importing a Customer using CSV Imp

In a Spreadsheet program create a list of customers with the following attributes:

List of Customers

HDIST

Harkin Distribution

NORMAL

10

NET30

Karen

Harkins

555-123-4532

ZOGP

Herzog Partners

NORMAL

10

NET30

Eric

Herzog

555-322-3211

PENSG

Penny Lane Sales Group

NORMAL

10

2-10-NET-30

Frank

Murando

555-433-2133

Save the file as 'customers.csv'. This varies depending on the application, but usually involves going to File > Save As... typing in the name of the file and selecting .CSV as the format.

Launch CSV Imp and go to Map > Edit. Here we will create a map from your new CSV file to the api.customer view. Click the 'Add' button.

Map Name Dialog

APIcsvimp1.png

Enter 'My Customers' as the map name. Click 'Ok.'

Select table dialog

APIcsvimp2.png

Select the api.customer view as the table to map to. Click 'Ok.'

Mapping the data

APIcsvimp3.png

Now you are ready to map the data. The mapping tool allows you to map table or view fields to column numbers on the CSV file you are migrating. Simply find the data fields we populated in the CSV file on the column listing and under the Use Value header select UseColumn. Then select the appropriate column number as pictured. The map should be as follows when you are finished:

Column Mappings

Field

Column #

customer_number

1

customer_type

3

customer_name

2

sales_rep

4

default_terms

5

billing_contact_first

6

billing_contact_last

7

billing_contact_voice

8

After you have created your maps go to File > Save and save the file as 'My Atlas.' Then close the CVS Atlas window.

Now got to File > Open CSV and select the 'customers.csv' file you created earlier. You should see your spreadsheet data loaded in the window.

Go to Import > Start.

Starting the Import

APIcsvimp4.png

The 'My Customers' map should be the only available map. Click Ok.

If all went well you should see a message that the import was successful and be able to view the customers in your PostBooks® client.

Customer list with imported Customers

APIcsvimp5.png

 

See xTuple Training.

up
113 users have voted.