Creating a Schema
You can use the GenerateSchemaFiles property to generate table definitions for RSS and ATOM feeds. This property can be used to generate schemas when you connect or when you execute a query. Set the URI to the feed url and the Format is the format of the feed RSS or ATOM. Set the Location connection property to the folder where you want the resulting schemas to be placed.
Alternatively, you can call the CreateSchema stored procedure.
EXEC CreateSchema TableName='MyFeed', URL='http://myservice/myfeed/'
The schema is written in RSBScript, a simple configuration language that allows you to define the columns for the table. You are able to make modifications by adding, removing, or editing columns.
Add a Column
Table columns are defined in the rsb:info block, which defines the column names, data types, element path. To add a new column to a table, you can simply append an attribute to rsb:info. You will need to set the following values:- name: the desired column name. The column names do not need to match the element names from the feed; you will define this mapping in the next step.
- xs:type: an appropriate data type. The adapter accepts the following data types: int, double, datetime, time, string, long, boolean, and decimal.
- key: whether this column is a primary key (a unique identifier that can be used to select this record and this record only).
- other:xPath: path to the element relative to the channel
Remove a Column
Deleting an attr element from rsb:info will remove the column from the resource. This means that your table will not list the column. Note that it is important to delete the entire XML element for the column that you want to remove.
Editing a Column
You can rename a column by changing the name attribute of the attr. You can also edit a column's data type by changing the xs:type attribute to one of the following support types:- string
- datetime
- boolean
- int
- long
- double