Use the Schema Discovery button in the Adapter shape to discover and automatically create a schema based on the format of the data from the adapter.
Prerequisites
Add the adapter to the diagram and set its properties.
Task- Click Schema Discovery
on the adapter toolbar. SAP Sybase Event Stream Processor Studio displays a Progress
Information box and looks for the configuration.
- If the schema is configured properly and one or more
data sets are found, a Schema Discovery: Select Schema dialog appears
where you can view and select a schema.
- If the schema is not successfully discovered, an error
message appears stating that no schema was discovered for the adapter.
You can:
- Check that the adapter properties are configured
for schema discovery.
- Check the Studio Users
Guide to see if the adapter supports schema
discovery.
- Select the schema you need.
You can expand the data set to view the schema.
For this example, select positions.xml, then click Next.
- In the Schema Discovery: Create Element dialog, choose Create new input window (with inline
schema).
This option creates and attaches a new window to the adapter, creates an inline schema for the window, and populates the window with the schema discovered from the adapter.
When the adapter is not yet attached to a stream or window, other options are:
- Create a new input stream (with inline schema). – creates and attaches a new stream to the adapter, creates an inline schema for the stream, and populates the stream with the schema discovered from the adapter.
- Create a new input stream (with attached schema). – Creates and attaches a new stream to the adapter, creates and
attaches a new named schema to the stream, and populates the stream
with the schema discovered from the adapter.
- Create a new input window (with attached schema). – Creates and attaches a new window to the adapter, creates and
attaches a new named schema to the window, and populates the window
with the schema discovered from the adapter.
- Create new named schema. – creates a new named schema and populates it with the schema discovered from the
adapter.
- Click Finish.
- The new input window appears with the default name
positions_xml_window1, and is automatically connected to the File/Hadoop
Event XML Input adapter.
- The adapter file property is set. The red warning border disappears, indicating that
the element is now valid.
- In the Schema compartment of the input window, click the
Toggle Key
buttons for the BookId and Symbol columns to specify the primary key. The

button indicates primary
key columns. With the primary key, the shape becomes valid.
- Click the input window Edit
button
and name it Positions.
Next
Create another input window, PriceFeed. Either:
- Create the PriceFeed input window manually, following steps in the next
task, or,
- Insert another File/Hadoop Event XML Input adapter and
configure it for schema discovery. This time, when you discover the schema,
choose pricefeed.xml in the exampledata directory. Name the input window
PriceFeed, and click the Id column to make it the primary key.