Reading Kafka Records That Contain XML
(Doc ID 2946972.1)
Last updated on AUGUST 12, 2024
Applies to:
Oracle Stream Analytics - Version 19.1.0.0.6 and laterInformation in this document applies to any platform.
Goal
On : 19.1.0.0.6 version, CEP system
Reading Kafka records that contain XML
Customer wants to read from a Kafka topic that has records which contain an XML as text.
When creating the stream resource, if customer selects JSON as Data Format, and then infer the shape, is getting this error: "Failed to infer shape. Cannot read any events in the stream.".
If manually set the shape as a single text field, the stream gets created, but if use it inside a pipeline, customer can't see any data.
If select CSV as Data Format and manually set the shape, inside the pipeline, customer can see the data, but gets an unexpected behavior. Customer would expect each record to contain the full XML, but instead they see that each record contains a single line of an XML. So let's say that an XML coming from the topic has 10 lines, inside the pipeline we get 10 separate records, one for each line.
Customer wants to know how to read records correctly, where inside the pipeline each row to contain the full XML file.
Solution
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Goal |
Solution |