April 9, 2013

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.
  • Enterprise Service: D-PERSON
  • Description: Demo Enterprise Service for Person data
  • Operation: Sync
  • Object Structure: D-PERSON



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:
  • File Type: Flat file
  • Delimiter (default): ,
  • Text Qualifier (default): "
  • Import Preview: True
  • Import File: select your Person.csv file



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.
  • PERSONID is empty or doesn't match with any existing record in the PERSON table: Insert a new PERSON record
  • PERSONID matches an existing record in the PERSON table: Update the PERSON record

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.

14 comments:

  1. You are right sir .Another process is to importing data is through the SQL Loder utility to the interface table and after that the data is goes to the Maximo Tables .

    ReplyDelete
  2. If I get the error below, what does that mean?

    BMXAA1581E - No object with the name {0} is set up in Jthe NDI tree. Check the JMS/JNDI setup in the server administration console.

    ReplyDelete
    Replies
    1. I had to set up the JMS queues in WebSphere before the error would go away. Thanks Chon: http://maximotimes.com/maximo/setup-integration-framework-jms-queues-and-buses-in-websphere/

      Delete
  3. Could anyone help !
    BMXAA5804E - Cannot import the data in the person.csv file. Review the file to verify that the content is correct and review the server and error log files for additional information.
    BMXAA6534E - Processing for an inbound transaction failed. The processing exception is identified in line 2.
    BMXAA6965E - Cannot process the information in a file because the the file extract operation failed to start.
    null
    Thanks in advance !
    JC

    ReplyDelete
    Replies
    1. Besides the File Header, you need a another header in front of it that describes what system should import the file. For example..

      D-EXTSYS,D-PERSON,,EN
      DEPARTMENT,DISPLAYNAME,FIRSTNAME,LASTNAME,LOCATION,LOCATIONSITE,PERSONID,PRIMARYEMAIL,PRIMARYPHONE,STATUS,TITLE
      9999,John Doe,John,Doe,,SITE,JDOE,,999/999-9999 x9999,ACTIVE,Plumber

      Delete
  4. Have you tried import the csv file included some special charactor, for example: "Ø","äöå"?

    ReplyDelete
  5. If a CSV file can not be imported due to errors, where does it reside on the server? I uploaded the via the web interface in Maximo (Integration > External Systems).

    ReplyDelete
  6. Hi, when I try to import a CI.csv file into a customer Control Desk environment, I get error messages. When I used the same file on my own environment, it worked fine. The error codes say something is wrong in the header, but that seems odd because the file worked OK on my own system.
    Any idea?
    BMXAA5804E - Cannot import the data in the RWG-Test-QC.csv file. Review the file to verify that the content is correct and review the server and error log files for additional information.
    BMXAA6534E - Processing for an inbound transaction failed. The processing exception is identified in line 0.
    BMXAA7023E - Integration processing failed because the header section in the input file is not correct.

    ReplyDelete
  7. Even I am also facing same issue . Any one have solution for this issue ?

    ReplyDelete
  8. I am trying to import new person records, and receiving an error, BMXAA3097E The person does not exist or in not active.
    Please assist, I have followed all steps in your process thus far.

    ReplyDelete
  9. Hello everyone,

    I am trying to import 9000 ASSETSPEC's using MIF and FLATFILE. With less than 3000 register it works perfectly, but with bigger than 3000_Register_files, then "TFMSDA0364E - ERROR: Dataload record import limit exceeded. The maximum number of records allowed to be imported at any one time is 3000" message appears.
    Is there any parameter or property to increase 3000 register limit ?
    Thank you.

    ReplyDelete
  10. Hello again... there is a property in System Properties: sda.dataload.recordlimit with 3000 value.
    Bye guys.

    ReplyDelete
  11. Hi.. I can able to update the data in ALNDOMAIN table but not able to insert, message are error out in the Cqin, any idea?

    ReplyDelete
  12. Hi! What if I want to wipe out a field? what should I add in the template? since if I leave the attribute blank, it just won't affect it.
    Thanks in advance!

    ReplyDelete