Class FirstRowMetadataTranslator

  • All Implemented Interfaces:
    ComponentLifecycle, ComponentLifecycleExtension, ResultSetTranslator

    public class FirstRowMetadataTranslator
    extends MetadataResultSetTranslatorImpl
    Translate the first row of the result set into metadata.

    Each column of the result set is used to create a new item of metadata. The metadata key for each new metadata item is the combination of MetadataResultSetTranslatorImpl.getMetadataKeyPrefix(), MetadataResultSetTranslatorImpl.getSeparator() and the column name (or label if it's different). The value is the value of the column.

    If you want to see how many rows were processed you can set one/both of the following;

    Item Description Value
    result-count-metadata-itemIf set to a String metadata item name will specify the metadata item to contain the number of rows returned by your queryMetadata item name
    update-count-metadata-itemIf set to a String metadata item name will specify the metadata item to contain the number of rows updated by your SQL statementMetadata item name

    In the adapter configuration file this class is aliased as jdbc-first-row-metadata-translator which is the preferred alternative to the fully qualified classname when building your configuration.