You can specify the data type to be assigned to an unknown attribute in the following ways:
The sequence shown corresponds to the prioritization of the automatic data type identification.
Warning
The data type of existing PPM attributes cannot be modified.
Meta data
In the system event files to be imported, you can specify a PPM data type and, optionally, a format (e.g., to identify time stamps) and attribute description for each attribute of a system event. Attributes that are not yet known in the PPM system are automatically generated with the specified data type.
Meta data is specified in the metadata XML element:
<eventlist>
<metadata>
<attr_desc type="...">
<ppmdatatype>...</ppmdatatype>
<format>...</format>
<description>...</description>
</attr_desc>
...
</metadata>
<event>
...
</event>
...
</eventlist>
The XML tags for the metadata XML element have the following meaning:
XML tag |
Description |
attr_desc |
Individual meta data definition of a system event attribute. Multiple definitions can be specified. |
type |
Name of the system event attribute |
ppmdatatype |
PPM data type to be assigned to the PPM attribute generated. |
format |
Format to be used for parsing the attribute value. If you have also enabled automatic mapping, the format is also used to transform the value into PPM time format. |
description |
Description of the PPM attribute generated. The specified description is transferred in the attribute configuration in the default language of the PPM client. |
Example
<eventlist>
<metadata>
<attr_desc type="SWWWIHEAD-WI_ID">
<ppmdatatype>TEXT</ppmdatatype>
<description>Work item ID</description>
</attr_desc>
<attr_desc type="SWWWIRET-WI_AED">
<ppmdatatype>DAY</ppmdatatype>
<format>yyyyMMdd</format>
<description>End date of work item</description>
</attr_desc>
</metadata>
<event>
<attribute type="SWWWIHEAD-WI_ID">000000525723</attribute>
<attribute type="SWWWIRET-WI_AED">20011211</attribute>
</event>
</eventlist>
The extractors available for PPM (Process Extractor SAP-2-PPM and Process Extractor JDBC-2-PPM) automatically generate the metadata XML element, allowing you to directly import the system event files generated without doing anything. Attributes that are not yet known in the PPM system are automatically generated with the correct data type.
Pattern identification
The datatypekeydetectionsettings XML element in the data source file can be used to specify a list of patterns (datatypedetectionpattern XML elements) to be used for data type assignment. The names of all new attributes identified are compared with the patterns. The first pattern identified in the list specifies the data type of the attribute.
Example
The following extract from the data source file configures the following naming pattern to identify the data type of new attributes identified:
...
<attributesettings autoextendattributes="true">
<datatypedetectionsettings>
<datatypekeydetectionsettings >
<datatypedetectionpattern datatype=”LONG”>*L
</datatypedetectionpattern>
<datatypedetectionpattern datatype=”LONG”>L_*
</datatypedetectionpattern>
<datatypedetectionpattern datatype=”DOUBLE”>D*D
</datatypedetectionpattern>
</datatypekeydetectionsettings>
</datatypedetectionsettings>
</attributesettings>
...
Attribute value parsing
If pattern identification is unable to identify a data type, an attempt is made to identify the data type based on the value of the attribute. The following data types are identified: BOOLEAN, LONG, DOUBLE, TIME, TIMEOFDAY, DAY, and TEXT. The enumeration corresponds to the priority for data type identification.
Data type BOOLEAN
The attribute values true and false are assigned to the BOOLEAN data type regardless of capitalization. Other values, e.g., 0 and 1 are not identified as BOOLEAN.
Data types LONG and DOUBLE
If the BOOLEAN data type is not identified, the system attempts to identify numerical values. When identifying numerical data types, a distinction is made between integers and floating point numbers. In the doubleonly attribute for the datatypevaluedetectionsettings XML element, you can use the value TRUE (default value) to specify that integer attribute values should be assigned to the data type DOUBLE.
Identification of the DOUBLE data type does not require you to specify a thousands separator. The point (period) is the only decimal separator identified.
Data types TIME, TIMEOFDAY, and DAY
If no numerical data type is identified, the system attempts to identify the attribute value as a time stamp (TIME), time of day (TIMEOFDAY), or date (DAY). The enumeration corresponds to the priority for data type identification. For each of the data types time stamp, time of day and date, you can optionally use the timeformat, timeofdayformat and dayformat XML elements to specify format strings describing the formats of the specified attribute values. If you do not specify format strings, the following default formats apply:
Data type |
Default format |
TIME |
dd.MM.yyyy HH:mm:ss |
TIMEOFDAY |
MM/dd/yyyy |
DAY |
HH:mm:ss |
Data type TEXT
If no data type has been identified so far by parsing the attribute value, the attribute is assigned the data type TEXT.
Behavior with ambiguous data types
You can use the numberofvaluestocheck attribute for the datatypevaluedetectionsettings XML element to specify how often the data type is to be retrieved by parsing the attribute value. If the XML attribute is not specified, the default value of 100 is used. If different data types are identified for an attribute, the data type previously identified is converted into a general data type. The following table applies:
Data type |
General data type |
BOOLEAN |
TEXT |
LONG |
DOUBLE, TEXT |
DOUBLE |
TEXT |
TIME |
TEXT |
TIMEOFDAY |
TEXT |
DAY |
TEXT |
TEXT |
TEXT |
Example
The file extract below shows a complete configuration for automatic data type identification by parsing the attribute value.
...
<attributesettings autoextendattributes="true">
<excludepatterns>
<excludepattern>TEST*</excludepattern>
<excludepattern>USER</excludepattern>
</excludepatterns>
<datatypedetectionsettings>
<datatypekeydetectionsettings>
<datatypedetectionpattern datatype = "LONG">LG_*
</datatypedetectionpattern>
<datatypedetectionpattern datatype = "LONG">*LONG*
</datatypedetectionpattern>
<datatypedetectionpattern datatype = "LONG">*_lng
</datatypedetectionpattern>
<datatypedetectionpattern datatype = "DOUBLE">DOUBLE_*
</datatypedetectionpattern>
<datatypedetectionpattern datatype = "DOUBLE">*_dbl
</datatypedetectionpattern>
<datatypedetectionpattern datatype = "DAY">DAY_*
</datatypedetectionpattern>
<datatypedetectionpattern datatype = "DAY">*_day
</datatypedetectionpattern>
<datatypedetectionpattern datatype = "TIMEOFDAY">TIMEOFDAY_*
</datatypedetectionpattern>
<datatypedetectionpattern datatype = "TIMEOFDAY">*_tod
</datatypedetectionpattern>
<datatypedetectionpattern datatype = "TIME">TIME_*
</datatypedetectionpattern>
<datatypedetectionpattern datatype = "TIME">*_tm
</datatypedetectionpattern>
<datatypedetectionpattern datatype = "TEXT">TEXT_*
</datatypedetectionpattern>
<datatypedetectionpattern datatype = "TEXT">*_txt
</datatypedetectionpattern>
</datatypekeydetectionsettings>
<datatypevaluedetectionsettings
doubleonly = "FALSE"
numberofvaluestocheck = "100">
<timeformat>dd.MM.yyyy HH:mm:ss</timeformat>
<timeofdayformat>HH:mm:ss</timeofdayformat>
<dayformat>dd.MM.yyyy</dayformat>
</datatypevaluedetectionsettings>
</datatypedetectionsettings>
<attributeprefix>AT_</attributeprefix>
</attributesettings>
...