Interface Formatter


public interface Formatter
Formatter is an interface to a user-specified class used for formatting NoSQL Database records into Strings which are appropriate for importing into a specific Oracle External Table. toOracleLoaderFormat(KeyValueVersion, KVStore) is called once for each record retrieved by the NoSQL Database External Table preprocessor Preproc. The String value returned by toOracleLoaderFormat(KeyValueVersion, KVStore) is written to stdout where it is then read by Oracle Database for insertion into the External Table being populated. The String returned should match the format specified in the External Table ACCESS PARAMETERS.

A null return value or an exception from toOracleLoaderFormat(KeyValueVersion, KVStore) signals to the preprocessor that this record should be skipped and not be written to stdout. This provides a simple selection and filtering mechanism beyond the parameters that can be passed to the Preprocessor using the Publish utility.

Since:
2.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Convert a KeyValueVersion into a String which can be interpreted by the Oracle External Table definition.
  • Method Details

    • toOracleLoaderFormat

      String toOracleLoaderFormat(KeyValueVersion kvv, KVStore kvstore)
      Convert a KeyValueVersion into a String which can be interpreted by the Oracle External Table definition. If this method throws an exception the record is ignored.
      Parameters:
      kvv - the Key and Value to be formatted.
      kvstore - the KV Store object related to this record so that the Formatter may retrieve.
      Returns:
      The formatted record suitable for interpretation by Oracle. If null is returned, then this record will not be passed to Oracle.