Service Desk Practitioners Forum
cancel

Import mapping problems of external events in OVSD4.5

Highlighted
gzitsm
Regular Contributor.

Import mapping problems of external events in OVSD4.5

Dear all,

I am now collecting incidents from three monitor systems into OVSD4.5. After I used the program of sd_event.exe from an external system to insert a record in "Incident" two days ago, I executed the same command line today, It updated the record instead of creating a new one. So what about the mapping of event id?

When I use an identical external event id and different classes of the "external_event" import mapping, the second command will update the record created by the first command.
How can I insert two records when the diffent systems have the same event id?

What is the limit length of ID? Does the ID
begin from number one after I backup all the data?

Thanks
Bill
6 REPLIES
Michel SILVA SO
Outstanding Contributor.

Re: Import mapping problems of external events in OVSD4.5

Hi Bill,
in the mappings you can define which fields are considered as "Unique Key" the fields you choose have to be different for each records...

More that one field can be considered to generate the "Unique Key".

Hope this helps,
Rgds,
Michel
gzitsm
Regular Contributor.

Re: Import mapping problems of external events in OVSD4.5

A good idea, thank you, Michel. But when I define the 'event id' and 'category' as UK with the "category" map of "10-hardware,20-software,...", sd_event cannot execute successfully.

The following are the log messages:
[EVENT_3004]
VALUE_LIST="username=sd_event#password=sd_event#mapping=external_event#className=incident#modus=INSERT#event_id=12345#description=Fatal error description#information=Fatal error information#impact=high#priority=high#ci=PRINK001#classification=10#category=10#"
SERVER=gzcss8501
PORT=30980
SERVER_RESPONSE=WARNING: JDBC error 8114: [GZCSS8501]Error converting data type nvarchar to numeric., SQL state: 01000 for query: SELECT T1.inc_oid AS C0 ,T1.inc_lockseq AS C1 FROM itsm_incidents T1 WHERE (T1.inc_sourceid = ?) AND (T1.inc_cat_oid = ?) Values: 12345 Hardwarejava.sql.SQLException: [GZCSS8501]Error converting data type nvarchar to numeric.
LANGUAGE=GB
TRY=1
LOGFILE=sd_event.log
ERROR_LOGFILE=sd_event_error.log
TIMESTAMP=11/22/2006 21:42:44
ONFAIL=

But if the "category" is not part of UK, it can run as expectly.

Would you like to analysize the above?
CADBIOSS
Outstanding Contributor.

Re: Import mapping problems of external events in OVSD4.5

Bill,

It looks like you're trying to map the identifier into a field that is numeric. You may want to check your mappings so that the category+event_id is allowed into the field you're mapping to. I gather your category+event_id is alpha-numeric?

Cheers...

Jim
Robert S. Falko
Acclaimed Contributor.

Re: Import mapping problems of external events in OVSD4.5

Indeed - are you mapping your external event id to the field Source ID (which is a text field)?

-Josh
gzitsm
Regular Contributor.

Re: Import mapping problems of external events in OVSD4.5

The mapping is like the following:
event_id - "source id", category - "category".

I know that "source id" is a text field and "category" is a numeric field, but why successful when "category" is not part of Unique keys ?

Bill
Dean Morrell
Honored Contributor.

Re: Import mapping problems of external events in OVSD4.5

SQL can be a pretty strongly-typed language -- maybe you need some sort of to_char(category) conversion to convert it to a string to concatenate the two fields... But I'm not sure off-hand where you could insert such a function in the data importer...?

Just a thought,
-d
I know the voices in my head aren't real, but they still have some REALLY FUN ideas.