Schema Discovery Using Input Adapters

In the tutorial you use the schema discovery feature to discover an external schema and create a CCL schema based on the format of the data from the datasource connected to an adapter.

Input Adapters in the Diagram

An input adapter identifies the external source for the input stream or window, and translates it into a format that Event Stream Processor Server accepts. You can add adapters to the diagram before or after adding input and output streams or windows.

ESP provides a set of built in adapters for common databases, message bus, file systems, sockets, and more. You can also develop custom adapters using the SDK, in C/C++, Java, or .NET. Most adapters provided can be used as input or output adapters.

Schema Discovery Basics

Every row in a stream or window must have the same structure, or schema, which includes the column names, the column datatypes, and the order in which the columns appear. Multiple streams or windows can use the same schema, but each stream or window can only have one schema.

Rather than manually creating a new schema in your ESP project, you can use schema discovery to discover and automatically create a schema, stream, or window based on the format of the data from the datasource to which your adapter connects. For example, you create a table in your SAP HANA database and use the SAP HANA Output adapter to connect to the database. You can then use schema discovery to discover and create a schema, stream, or window in your ESP project that corresponds to the schema of the table you created in your SAP HANA database.

In the tutorial, you discover the schema for the PriceFeed input window from the File/Hadoop Event XML Input adapter.

To discover a schema, you need to first configure the adapter properties. Each adapter that supports schema discovery has unique properties that must be set to enable schema discovery. For a list of adapters that support schema discovery and properties to configure, see the Studio Users Guide. For property details, see your adapter type in the Adapters Guide.

Related tasks
Adding an Input Adapter
Discovering a Schema