Discovering a Schema

Use the Schema Discovery button in the Visual editor to discover and (automatically) create a schema based on the format of the data from the adapter.

Prerequisites
Add the adapter to the diagram.
Task
In the SAP Sybase ESP Authoring perspective:
  1. Configure the adapter for schema discovery. In the adapter shape, click Edit Properties adapter_in and complete the dialog:
    • Select Use named property set and select a property set from the drop down menu, or,
    • Select Consolidate adapter properties from 'Adapter Properties' dialog and enter property values in the Basic and (optionally) Advanced tabs. Required properties are in red.
    For example, to use schema discovery for the File CSV Input adapter, you need to first configure the Directory and File properties for the adapter, to specify the absolute path to the data files you want the adapter to read.
    Note: To create a named property set, edit adapter properties in the project configuration file.
  2. Click Schema Discovery find.gif on the adapter toolbar.
    • If the schema is successfully discovered, 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.
  3. Select a schema, and click Next.
  4. In the dialog for creating an element, select an option.
    Adapter State Available Options
    The adapter is not attached to a stream or window.
    • 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 window (with inline schema). – 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.
    • 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 a new named schema. – Creates a new named schema and populates it with the schema discovered from the adapter.
    The adapter is already attached to a stream or window.
    • Apply the schema to the connecting stream or window. – Populates the stream or window with the schema discovered from the adapter.
    • Create a new named schema. – Creates a new named schema and populates it with the schema discovered from the adapter.
  5. Click Finish.
Related concepts
Schema Discovery
Related reference
Adapter Support for Schema Discovery