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.
    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.
  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 Schema Discovery: 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 with the default name positions_xml_window1, and is automatically connected to the File XML Input adapter.
    • The adapter file property is set. The red warning border disappears, indicating that the element is now valid.
  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.
    The column_key.gif button indicates primary key columns.With the primary key, the shape becomes valid.
  6. Click the input window Edit input_window.gif button and name it Positions.
Next
Create another input window, PriceFeed. Either:
Related concepts
Schema Discovery Using Input Adapters