Interface ImportTableWriterFactory

All Known Implementing Classes:
AppendingImportTableWriterFactory, DirectoryImportTableFactory, ImportTableWriterFactoryBase, MultiPartitionImportTableWriterFactory, SinglePartitionImportTableFactory

public interface ImportTableWriterFactory
A Factory to generate TableWriters for use with various importers.
  • Method Details

    • getTableDefinition

      TableDefinition getTableDefinition()
      Get the table definition associated with the table that will be written.
      Returns:
      the table definition.
    • getTableWriter

      TableWriter getTableWriter​(String columnPartitionValue, boolean append)
      Get a TableWriter for the table and specified partition, optionally appending.
      Parameters:
      columnPartitionValue - the column partition to use. Some implementations allow nulls.
      append - if the table should be appended or replaced.
      Returns:
      an appropriate TableWriter
    • getTableDestination

      File getTableDestination​(String columnPartitionValue)
      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.
    • getTableWriter

      default TableWriter getTableWriter​(String columnPartitionValue)
      Get a TableWriter that will replace the specified column partition. This is the same as calling getTableWriter(String, boolean) with false.
      Parameters:
      columnPartitionValue - the column partition
      Returns:
      an appropriate TableWriter
    • getComputedColumnPartition

      @Nullable String getComputedColumnPartition​(@Nullable String inputColumnPartition)
      Get the computed column partition for the requested one. In Most cases the result will be the same as inputColumnPartition, 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