Class SinglePartitionImportTableFactory

java.lang.Object
com.illumon.iris.importers.ImportTableWriterFactoryBase
com.illumon.iris.importers.SinglePartitionImportTableFactory
All Implemented Interfaces:
ImportTableWriterFactory

public class SinglePartitionImportTableFactory extends ImportTableWriterFactoryBase
This should be used when a non-null single partition value should be used for import.

The factory will always return this single partition in the getComputedColumnPartition(String) call.

This also means the getTableDestination(String) returns the same destination

  • Constructor Details

    • SinglePartitionImportTableFactory

      public SinglePartitionImportTableFactory(@NotNull String namespace, @NotNull String tableName, @NotNull ImportOutputMode outputMode, @NotNull TableDefinition tableDefinition, @NotNull String internalPartition, @NotNull String columnPartition)
      Constructor.
      Parameters:
      namespace - The schema namespace
      tableName - The schema tablename
      outputMode - The selected mode (one of safe, append, replace)
      tableDefinition - The schema table definition
      internalPartition - Non-null internal partition that is needed to build the FullTableLocationKey
      columnPartition - Non-null column partition used to build the FullTableLocationKey
  • Method Details

    • getTableDestination

      public File getTableDestination(@Nullable String columnPartitionValue)
      Description copied from interface: ImportTableWriterFactory
      Get a File representing the path where the table will be written.
      Parameters:
      columnPartitionValue - the column partition to find the destination for
      Returns:
      a file at the path the table will be written.
    • getComputedColumnPartition

      public String getComputedColumnPartition(@Nullable String inputColumnPartition)
      Description copied from interface: ImportTableWriterFactory
      The method is invoked to determine the partition value to which the current row of data needs to be associated. So in the case where user wants a single partition value for the import this should return that value. In other cases this may simply return the passed in value, however, it is possible to return null indicating that there is no valid column partition.
      Parameters:
      inputColumnPartition - the requested input partition
      Returns:
      the computed column partition