Interface TableFormatter


public interface TableFormatter
TableFormatter is an interface to a user-specified class used for formatting rows in NoSQL Database tables into Strings which are appropriate for importing into a specific Oracle External Table. toOracleLoaderFormat(Row, KVStore) is called once for each row retrieved from Oracle NoSQL Database table by the NoSQL Database External Table preprocessor Preproc. The String value returned by toOracleLoaderFormat(Row, 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(Row, 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:
3.0.11
  • Method Summary

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

    • toOracleLoaderFormat

      String toOracleLoaderFormat(Row row, KVStore kvstore)
      Converts a Row into a String which can be interpreted by the Oracle External Table definition. If this method throws an exception the record is ignored.
      Parameters:
      row - the Row from Oracle NoSQL Database table to be formatted.
      kvstore - the KV Store object related to this row so that the TableFormatter may retrieve.
      Returns:
      The formatted row suitable for interpretation by Oracle. If null is returned, then this row will not be passed to Oracle.