Service Desk Practitioners Forum
cancel

Import data from Excel to CMDB

Highlighted
Leep
Respected Contributor.

Import data from Excel to CMDB

Hi!
I am doing an import from a Excel file to CMDB. I got following message. I have checked required fileds, there are values there. Can someone help? How can I which fields are missing since I have filled in all of them in Excel.

Regards,
Leep

warning: While processing CMDB_Data_Import_Excel (id = 1):
com.hp.ifc.ext.ExternalException: This instance of CMDB_Data_Import_Excel can not be processed, because not all primary keys values have been provided.
at com/hp/ifc/ext/AppSingleLoad.processEntity
at com/hp/ifc/ext/imp/AppEntityHandler.endElement
at com/jclark/xml/sax/Driver.endElement
at com/jclark/xml/parse/EntityParser.parseContent
at com/jclark/xml/parse/EntityParser.parseDocumentEntity
at com/jclark/xml/parse/DocumentParser.parse
at com/jclark/xml/parse/base/ParserImpl.parseDocument
at com/jclark/xml/sax/Driver.parse
at com/hp/ifc/ext/imp/AppImpTaskParser.parseFile
at com/hp/ifc/ext/imp/AppImpTaskParser.objectToSD
at com/hp/ifc/ext/imp/AppImpTaskParser.parseChunk
at com/hp/ifc/ext/imp/AppImpTaskParser.parseSerial
at com/hp/ifc/ext/imp/AppImpTaskParser.parse
at com/hp/ifc/ext/imp/ImportXmlCim.startImportTask
at com/hp/ifc/ext/imp/ImportXmlCim.startImportTask
at com/hp/ifc/ext/imp/ImportXmlCim.main
This instance of CMDB_Data_Import_Excel can not be processed, because not all primary keys values have been provided.
warning: While processing CMDB_Data_Import_Excel (id = 2):
com.hp.ifc.ext.ExternalException: This instance of CMDB_Data_Import_Excel can not be processed, because not all primary keys values have been provided.
at com/hp/ifc/ext/AppSingleLoad.processEntity
at com/hp/ifc/ext/imp/AppEntityHandler.endElement
at com/jclark/xml/sax/Driver.endElement
at com/jclark/xml/parse/EntityParser.parseContent
at com/jclark/xml/parse/EntityParser.parseDocumentEntity
at com/jclark/xml/parse/DocumentParser.parse
at com/jclark/xml/parse/base/ParserImpl.parseDocument
at com/jclark/xml/sax/Driver.parse
at com/hp/ifc/ext/imp/AppImpTaskParser.parseFile
at com/hp/ifc/ext/imp/AppImpTaskParser.objectToSD
at com/hp/ifc/ext/imp/AppImpTaskParser.parseChunk
at com/hp/ifc/ext/imp/AppImpTaskParser.parseSerial
at com/hp/ifc/ext/imp/AppImpTaskParser.parse
at com/hp/ifc/ext/imp/ImportXmlCim.startImportTask
at com/hp/ifc/ext/imp/ImportXmlCim.startImportTask
at com/hp/ifc/ext/imp/ImportXmlCim.main
This instance of CMDB_Data_Import_Excel can not be processed, because not all primary keys values have been provided.
10 REPLIES
George M. Meneg
Acclaimed Contributor.

Re: Import data from Excel to CMDB

Hello,

For each Import Mapping you should provide at least one field that will act as primary key. It seems that you haven't defined one in your import mapping. If your mapping include relations you must provide a primary key for each related entity.
menes fhtagn
Leep
Respected Contributor.

Re: Import data from Excel to CMDB

Hi, George M. Menegakis!
Many thanks for your quick reply.
When I define import mapping, I made Search code Unique key and in my Excel I have provided the values. Have I done something wrong? I have not imported relatations into CMDB.

Regards,
Leep
Anda Apine
Honored Contributor.

Re: Import data from Excel to CMDB

Please attach print screen of import mapping and excel file (I need column names and first row of data) in forum.
Anda Apine
Honored Contributor.

Re: Import data from Excel to CMDB

How you have defined class names in excel?
Leep
Respected Contributor.

Re: Import data from Excel to CMDB

Hi!
Here come Excel file, ini file and a screen print of mapping.

Many many thanks.
Anda Apine
Honored Contributor.

Re: Import data from Excel to CMDB

try this:

1. set name in excel not Import, but "CMDB"
2. update ini file:
[CLASSES]
NAME=CMDB

[CMDB]
SOURCE=[CMDB]
ATT= [Security_Lable], [Search code] etc.
COLUMNS=[CMDB].[SecurityLabelNumber] AS [Security_Lable], [CMDB].[ComputerName] AS [Search code], etc.
LOADTABLE=TRUE

use the same name for class and source. don't use space in names - [Security Lable].

3. Did you got xml file from this ini file? generate xml file first - to ss is it working.
change class name in import mapping to "CMDB"

let me know did you succeeded.

Anda

Leep
Respected Contributor.

Re: Import data from Excel to CMDB

Hi!
Many thanks. It almost works. There was a problem in ini file. However, I have 3 rows but can only import one row. I got following message. Any ideas?

warning: While processing CMDB_Data_Import_Excel (id = 1):
com.hp.ifc.ext.ExternalException: Failed reading response from the server.
at com/hp/ifc/ext/AppExternalAccess.getMessage
at com/hp/ifc/ext/AppExternalEntity.save
at com/hp/ifc/ext/AppSingleLoad.processEntity
at com/hp/ifc/ext/imp/AppEntityHandler.endElement
at com/jclark/xml/sax/Driver.endElement
at com/jclark/xml/parse/EntityParser.parseContent
at com/jclark/xml/parse/EntityParser.parseDocumentEntity
at com/jclark/xml/parse/DocumentParser.parse
at com/jclark/xml/parse/base/ParserImpl.parseDocument
at com/jclark/xml/sax/Driver.parse
at com/hp/ifc/ext/imp/AppImpTaskParser.parseFile
at com/hp/ifc/ext/imp/AppImpTaskParser.objectToSD
at com/hp/ifc/ext/imp/AppImpTaskParser.parseChunk
at com/hp/ifc/ext/imp/AppImpTaskParser.parseSerial
at com/hp/ifc/ext/imp/AppImpTaskParser.parse
at com/hp/ifc/ext/imp/ImportXmlCim.startImportTask
at com/hp/ifc/ext/imp/ImportXmlCim.startImportTask
at com/hp/ifc/ext/imp/ImportXmlCim.main
Failed reading response from the server.
warning: While processing CMDB_Data_Import_Excel (id = 2):
com.hp.ifc.ext.ExternalException: Failed reading response from the server.
at com/hp/ifc/ext/AppExternalAccess.getMessage
at com/hp/ifc/ext/AppExternalEntity.save
at com/hp/ifc/ext/AppSingleLoad.processEntity
at com/hp/ifc/ext/imp/AppEntityHandler.endElement
at com/jclark/xml/sax/Driver.endElement
at com/jclark/xml/parse/EntityParser.parseContent
at com/jclark/xml/parse/EntityParser.parseDocumentEntity
at com/jclark/xml/parse/DocumentParser.parse
at com/jclark/xml/parse/base/ParserImpl.parseDocument
at com/jclark/xml/sax/Driver.parse
at com/hp/ifc/ext/imp/AppImpTaskParser.parseFile
at com/hp/ifc/ext/imp/AppImpTaskParser.objectToSD
at com/hp/ifc/ext/imp/AppImpTaskParser.parseChunk
at com/hp/ifc/ext/imp/AppImpTaskParser.parseSerial
at com/hp/ifc/ext/imp/AppImpTaskParser.parse
at com/hp/ifc/ext/imp/ImportXmlCim.startImportTask
at com/hp/ifc/ext/imp/ImportXmlCim.startImportTask
at com/hp/ifc/ext/imp/ImportXmlCim.main
Failed reading response from the server.
Anda Apine
Honored Contributor.

Re: Import data from Excel to CMDB

Problem is in data you are trying to import - can you post excel file with data in forum?

Check what is different for the column that was inserted correctly.
Leep
Respected Contributor.

Re: Import data from Excel to CMDB

Hi, Anda!
You are right! I checked the data, one column I changed to date format in Excel, now it works. Many many thanks for your help.

Have a nice weekend.
Leep
Respected Contributor.

Re: Import data from Excel to CMDB

It works now. Many thanks.