User Guide > Sample Files > Sample Files
  

Sample Files

The data objects in a streaming mapping read and write data in XML, JSON, Avro, CSV format. The following examples contain samples for each schema format.

Sample XSD File

When you configure the data operation properties, specify the format in which the data object reads or writes data. When you specify XML format, provide an XSD.
The following sample XSD describes the elements in an XML file:
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="shiporder">
<xs:complexType>
<xs:sequence>
<xs:element name="orderperson" type="xs:string"/>
<xs:element name="shipto">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="address" type="xs:string"/>
<xs:element name="city" type="xs:string"/>
<xs:element name="country" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="item" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string"/>
<xs:element name="note" type="xs:string" minOccurs="0"/>
<xs:element name="quantity" type="xs:positiveInteger"/>
<xs:element name="price" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="orderid" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:schema>

Sample JSON Schema

When you configure the data operation properties, specify the format in which the data object reads or writes data. When you specify JSON format, provide a sample JSON file.
The following file is a sample JSON file:
{
"GlossaryCont": {
"title": {
"string": "glossaryContTitle0"
},
"glossDiv": {
"title": "glossaryDivTitle0",
"glossList": {
"glossEntry": {
"id": "ID0",
"sortAs": "sortAS0",
"glossTerm": "GlossTerm0",
"acronym": "Acronym0",
"abbrev": "Abbrev0",
"glossSee": "GlossSee0",
"glossInteger": 0,
"glossDouble": 0.234,
"glossLong": 100000000000000000,
"glossDef": {
"para": "para0",
"glossSeeAlso": ["glossSeeAlso_0_0"]
}
}
}
}
}
}

Sample Avro Schema

When you configure the data operation properties, specify the format in which the data object reads or writes data. When you specify Avro format, provide a sample Avro schema in a .avsc file.
The following file is a sample Avro schema:
{
"type" : "record",
"name" : "Tree",
"fields" : [
{"name" : "children", "type" : ("type" : "array", "items": "Tree"}}
]}

Sample Flat Format Schema

When you configure the data operation properties, specify the format in which the data object reads or writes data. When you specify Flat format, provide a sample CSV file.
The following file is a sample CSV file:
acc_no,acc_type
1,Savings
2,Savings