This sample aims to give working examples of how to model various
forms of comma separated value (CSV) message.
The example messages models grow in complexity from CSV_1, which shows the
simplest CSV message, to CSV_4, which adds support for more complex common
features of CSV messages. CSV_5 and CSV_6 explore how tags can be used to make
the model simpler
and more flexible.
CSV messages are a common style of message, often used for data extracted from databases and spreadsheets. They comprise a number of newline terminated records each comprising a number of comma separated fields. Typically the same record will repeat a number of times.
Here is an example of a CSV message:
This sample includes an MRM message set that contains example messages covering the following common features of CSV messages:
The message set contains a Tagged/Delimited String (TDS) physical format called "CSV" and an XML physical format called "XML".
The CSV message set sample makes use of the following MRM functions:
The structure of all the samples is common. They each pass a CSV message into a simple flow which changes the format from "CSV" to "XML". This causes the CSV message to be parsed and then serialized as XML. From this we can see that the message model has successfully parsed the CSV message into the correct logical structure shown clearly in the XML output message. Each sample then passes the resulting XML message back through the reverse flow to show that the desired CSV message can be serialized using the model as well as parsed.
For a detailed explanation of how to run each sample see Running the CSV sample.
For a detailed explanation of the key points of each sample CSV message model see Exploring the CSV sample.