Discovering a Schema

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
  1. Click Schema Discovery find.gif on the adapter toolbar.
    • If the schema is configured properly and one or more data sets are found, a 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 to see if the adapter supports schema discovery.
  2. Select the schema you need.
    You can expand the data set to view the schema.
    For this example, select positions.xml, then click Next.
  3. In the Create Element dialog, choose Create new input window.
    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 – 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 new named schema. – creates a new named schema and populates it with the schema discovered from the adapter.
  4. Click Finish.
    The new input window appears, and is automatically connected to the File XML Input adapter.
  5. In the Schema compartment of the input window, click the Toggle Key column.gif buttons for the BookId and Symbol columns to specify the primary key.
    With the primary key, the shape becomes valid.
  6. (Optional) Click the input window Edit button and name it Positions.
Next
Create another input window, PriceFeed. Either:
Related concepts
Schema Discovery