Show TOC

Schema DiscoveryLocate this document in the navigation structure

Discover external schemas and create CCL schemas, streams, or windows based on the format of the data from the datasource that is connected to an adapter.

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.

While using discovery is a convenient way to create your CCL schema, pay particular attention to the data types that the CCL columns inherit from the external datasource. For example, whenever possible, discovery maintains the same level of precision or greater when mapping source data types to ESP data types. Some databases, such as SAP IQ, support microsecond precision for the SQL_TIMESTAMP and SQL_TYPE_TIMESTAMP data types. As such, schema discovery maps these types to the ESP data type bigdatetime, which also supports microsecond precision. If your ESP project does not require this level of precision, you can, after generating your schema through discovery, modify the schema to use a lower-precision data type, such as msdate (millisecond precision).

To discover a schema, first configure the adapter properties. Each adapter that supports schema discovery has unique properties that must be set to enable schema discovery.

Make sure that the Data Service has the ODBC Driver Library set correctly. Always use streamingdbodbc_lib for Windows (regardless of version). On other platforms, use streamingdbodbc64_lib if you are working with the HANA adapter. If not, the choice of driver library depends on the size of SQLLEN in the driver manager. If SQLLEN is 4 bytes, use streamingdbodbc_lib. If SQLLEN is 8 bytes use streamingdbodbc64_lib. See the SAP Event Stream Processor: Configuration and Administration Guide for more information.