Custom Schema Example
This section contains an example of a complete schema that has been automatically generated by GenerateSchemaFiles. Set the Location property to the file directory that will contain the schema file. The schema consists of the following parts:
- The info section enables a relational view of a MongoDB object. For more details, see Custom Schema Definitions.
- The collection attribute specifies the name of the collection to be parsed. The collection attribute can be used to define multiple schemas for the same collection. If collection is not specified, the filename determines the collection that is parsed.
<rsb:script xmlns:rsb="http://www.rssbus.com/ns/rsbscript/2">
<rsb:info title="StaticRestaurants" description="Automatic GenerateSchemaFile">
<!-- Column definitions -->
<attr name="borough" xs:type="string" other:bsonpath="$.borough" />
<attr name="cuisine" xs:type="string" other:bsonpath="$.cuisine" />
<attr name="address_building" xs:type="string" other:bsonpath="$.address.building" />
<attr name="address_street" xs:type="string" other:bsonpath="$.address.street" />
<attr name="address_coord_0" xs:type="double" other:bsonpath="$.address.coord.0" />
<attr name="address_coord_1" xs:type="double" other:bsonpath="$.address.coord.1" />
</rsb:info>
<rsb:set attr="collection" value="restaurants"/>
</rsb:script>