Importing data from a CSV file into Maximo

This entry is part of the Maximo Integration Framework series.

In this tutorial I will show how to configure the Maximo Integration Framework (MIF) in order to import data in Maximo from a Comma Separated Values (CSV) text file.

The best thing is to start with an export. Please follow this article before proceeding.

To be able to export data using the MIF we must configure the following chain:
  1. Object Structure
  2. Enterprise Service
  3. External System


Object Service

If you have followed the steps described in the Flat CSV file export with Maximo Integration Framework article you should already have the D-PERSON Object Structure and a sample CSV file.


Enterprise Service

Go to Integration > Enterprise Services application and create the following entry.



External System

Go to Integration > External Systems application and open the D-EXTSYS you have previously created. Click on the Enterprise Services tab and add the D-PERSON Enterprise Service. Enable it and disable the Use Continuous Queue check if you are not 100% sure that your continuous queue is working (go back to MIF first setup article if you have doubts). Here is what you should see.



Updating records

It's now time to try to import some data into Maximo.
Create a copy of the CSV file that you have exported, name it Person.csv and leave just one person record.
Modify an attribute of the person just for a test. Do not modify the PERSONID attribute since it is the unique ID of the record.
Here is how my Person.csv file looks like.

D-EXTSYS,D-PERSON,,EN
DISPLAYNAME,FIRSTNAME,LASTNAME,PERSONID
Keith Mills,Keith,Mills TESTTTTT,MILLS

In the Enterprise Service tab of the D-EXTSYS External System, select the D-PERSON Enterprise Service and click on Data Import button.
Fill the form like this:



Click on the OK button and you should see a message like this: BMXAA5621I - The data import preview mode is successful.
If everything's ok, click again on the Data Import button filling the same form but leave the Import Preview unchecked. Click OK and you are done.
Go to the Administration > Resources > People application, open the record that you have modified and you should see your updates.


Creating new records

As you probably already know each record in Maximo have a unique identifier that may be composed by one or more fields. You may have noticed that those fields cannot be excluded in the Object Structure. In our example the unique ID of the PERSON table is the PERSONID field.
Since we have used the Sync operation in the Enterprise Service, the MIF uses the following simple logic to understand is the imported record should be inserted or if it should update an existing one.

For example, if we want to create two new people we could use a CSV file like this.

D-EXTSYS,D-PERSON,,EN
PERSONID,FIRSTNAME,LASTNAME
AAAXXX,Aaa,Xxx
BBBYYY,Bbb,Yyy

Please note that I have moved the PERSONID attribute to the first position and removed the DISPLAYNAME attribute since it will be automatically calculated exactly as I would have created the person from the UI.

Labels: , , ,