Skip to main content

Class IngestOptions

java.lang.Object
com.gpudb.filesystem.ingest.IngestOptions

public class IngestOptions extends Object
  • Constructor Details

    • IngestOptions

      public IngestOptions()
      Default constructor
  • Method Details

    • getBadRecordTableName

      public String getBadRecordTableName()
      Returns the value of ‘bad_record_table_name’
      Returns:
      - a string
      See Also:
    • setBadRecordTableName

      public IngestOptions setBadRecordTableName(String badRecordTableName)
      Sets the value of ‘bad_record_table_name’.
      Parameters:
      badRecordTableName - - a string
      Returns:
      - an IngestOptions object
      See Also:
    • getBadRecordTableLimit

      public long getBadRecordTableLimit()
      Returns the value of ‘bad_record_table_limit’
      Returns:
      - a long value
      See Also:
    • setBadRecordTableLimit

      public IngestOptions setBadRecordTableLimit(long badRecordTableLimit)
      Sets the value of ‘bad_record_table_limit’
      Parameters:
      badRecordTableLimit - - a long value
      Returns:
      - an IngestOptions object
      See Also:
    • getColumnFormats

      public Map<String,org.apache.commons.lang3.tuple.Pair<String,String>> getColumnFormats()
      Gets the ‘column_format’ as a Map representing a JSON
      Returns:
      - a Map of a String to a Pair of Strings
      See Also:
    • setColumnFormats

      public IngestOptions setColumnFormats(Map<String,org.apache.commons.lang3.tuple.Pair<String,String>> columnFormats) throws com.fasterxml.jackson.core.JsonProcessingException
      Sets the column formats
      Parameters:
      columnFormats - - A Map of String to a Pair of Strings
      Returns:
      - an IngestOptions object
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException - - when conversion to JSON fails
      See Also:
    • getColumnsToLoad

      public Set<String> getColumnsToLoad()
      Gets the set of column names to load
      Returns:
      - a Set of column names
      See Also:
    • setColumnsToLoad

      public IngestOptions setColumnsToLoad(Set<String> columnsToLoad) throws GPUdbException, com.fasterxml.jackson.core.JsonProcessingException
      Sets the set of column names to load
      Parameters:
      columnsToLoad - - a Set of column names
      Returns:
      an IngestOptions object
      Throws:
      GPUdbException - - when names of columns to skip and load overlap
      com.fasterxml.jackson.core.JsonProcessingException - - when JSON conversion fails
      See Also:
    • getColumnsToSkip

      public Set<String> getColumnsToSkip()
      Gets the set of column names to skip
      Returns:
      - a Set of column names
      See Also:
    • setColumnsToSkip

      public IngestOptions setColumnsToSkip(Set<String> columnsToSkip) throws GPUdbException
      Sets the column names to skip
      Parameters:
      columnsToSkip - - a Set of column names
      Returns:
      - an IngestOptions object
      Throws:
      See Also:
    • getDefaultColumnFormats

      public Map<String,String> getDefaultColumnFormats()
      Gets a Map of default column formats
      Returns:
      - a Map of String to String
    • setDefaultColumnFormats

      public IngestOptions setDefaultColumnFormats(Map<String,String> defaultColumnFormats) throws com.fasterxml.jackson.core.JsonProcessingException
      Sets the default column formats
      Parameters:
      defaultColumnFormats - - a Map of string to String
      Returns:
      an IngestOptions object
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
      See Also:
    • getErrorHandlingMode

      public ErrorHandlingMode getErrorHandlingMode()
      Returns:
    • setErrorHandlingMode

      public IngestOptions setErrorHandlingMode(ErrorHandlingMode errorHandlingMode)
    • getFileType

      public FileType getFileType()
    • setFileType

      public IngestOptions setFileType(FileType fileType)
    • getPrimaryKeys

      public List<String> getPrimaryKeys()
    • setPrimaryKeys

      public IngestOptions setPrimaryKeys(List<String> primaryKeys)
    • getShardKeys

      public List<String> getShardKeys()
    • setShardKeys

      public IngestOptions setShardKeys(List<String> shardKeys)
    • getTextCommentString

      public String getTextCommentString()
    • setTextCommentString

      public IngestOptions setTextCommentString(String textCommentString)
    • getTextDelimiter

      public String getTextDelimiter()
    • setTextDelimiter

      public IngestOptions setTextDelimiter(String textDelimiter)
    • getTextEscapeCharacter

      public String getTextEscapeCharacter()
    • setTextEscapeCharacter

      public IngestOptions setTextEscapeCharacter(String textEscapeCharacter)
    • isTextHasHeader

      public boolean isTextHasHeader()
    • setTextHasHeader

      public IngestOptions setTextHasHeader(boolean textHasHeader)
    • getTextHeaderPropertyDelimiter

      public String getTextHeaderPropertyDelimiter()
    • setTextHeaderPropertyDelimiter

      public IngestOptions setTextHeaderPropertyDelimiter(String textHeaderPropertyDelimiter)
    • getTextNullString

      public String getTextNullString()
    • setTextNullString

      public IngestOptions setTextNullString(String textNullString)
    • getTextQuoteCharacter

      public String getTextQuoteCharacter()
    • setTextQuoteCharacter

      public IngestOptions setTextQuoteCharacter(String textQuoteCharacter)
      Setter method for text quote character
      Parameters:
      textQuoteCharacter - - a String value for the text quote character to be set
      Returns:
      - the current instance of IngestOptions
    • isTruncateTable

      public boolean isTruncateTable()
    • setTruncateTable

      public IngestOptions setTruncateTable(boolean truncateTable)
    • getTypeInferenceMode

      public TypeInferenceMode getTypeInferenceMode()
    • setTypeInferenceMode

      public IngestOptions setTypeInferenceMode(TypeInferenceMode typeInferenceMode)
    • put

      public void put(String key, int value)
    • put

      public void put(String key, long value)
    • put

      public void put(String key, String value)
    • put

      public void put(String key, boolean value)
    • getOptions

      public Map<String,String> getOptions()
      Getter method for all the options set
      Returns:
      - the Options as a Map of String to String