Use the InfoSphere®
MDM
Workbench and the Adaptive Services Interface (ASI) to customize the way that the Kafka processor
transforms responses from InfoSphere
MDM.
About this task
By default, InfoSphere
MDM
transaction responses are provided in an XML format, and then the Kafka processor uses XSLT to
transform the response to either target XML or JSON, depending on the configuration. Customize the
transformation using the MDM Workbench and ASI to generate a custom XSLT file.
Procedure
-
Create a new transformation XSL file using ASI mapping in the MDM Workbench.
-
Copy the new XSL file to the folder
<MDM_INSTALL_HOME>/KafkaProcessor/templates.
-
Open <MDM_INSTALL_HOME>/KafkaProcessor.
-
Edit kafkaruntime.properties and
kafkabatch.properties to update the following property:
#Target xsl mapping file
<entity type>.transformerXSLT=TargetResponse.xsl
Note: <entity type> is the entity type defined in the property
InquiryEntities
, and for which you have modified the transformation.
-
Optionally, you can also set the output format to be either XML or JSON using the following
property:
#Target response format xml or json
<entity type>.outputFormat=json
-
Optionally, modify the default templates that are used to create the inquiry transaction
requests.
The templates are stored in the folder
<MDM_INSTALL_HOME>/KafkaProcessor/templates. If required,
you can edit:
- the InquiryLevel
- the namespace
Note: The current framework provides
com.ibm.mdm.kafka.interfaces.ITransformData<K,V> and
com.ibm.mdm.kafka.interfaces.IMDMRequestCreator<T>
interfaces for transforming responses and building request XML. If required, you can provide a
custom implementation extending these interfaces and set the following
properties:
#Implementation of getParty request xml creator
mdmGetEntityRequestCreator=<Custom implementation for IMDMRequestCreator>
#Implementation of Party Response Transformer
mdmGetEntityResponseTransformer=<Custom implementation for ITransformData>