Class TextParsingSettings

java.lang.Object
org.apache.drill.exec.store.easy.text.reader.TextParsingSettings

public class TextParsingSettings extends Object
  • Constructor Details

    • TextParsingSettings

      public TextParsingSettings(TextFormatConfig config, TupleMetadata providedSchema)
      Configure the properties for this one scan based on:

      • The defaults in the plugin config (if properties not defined in the config JSON.
      • The config values from the config JSON as stored in the plugin config.
      • Table function settings expressed in the query (and passed in as part of the plugin config.
      • Table properties.

      The result is that the user can customize the behavior of a table just via the table properties; the user need not define a new storage config just to change a property. For example, by default, the `csv` config has no headers. But, if the user has a ".csv" file with headers, the user can just customize the table properties.

  • Method Details

    • getComment

      public byte getComment()
    • isSkipFirstLine

      public boolean isSkipFirstLine()
    • setSkipFirstLine

      public void setSkipFirstLine(boolean skipFirstLine)
    • getNewLineDelimiter

      public byte[] getNewLineDelimiter()
    • getQuote

      public byte getQuote()
      Returns the character used for escaping values where the field delimiter is part of the value. Defaults to '"'
      Returns:
      the quote character
    • getLineSeparatorString

      public String getLineSeparatorString()
    • getQuoteEscape

      public byte getQuoteEscape()
      Returns the character used for escaping quotes inside an already quoted value. Defaults to '"'
      Returns:
      the quote escape character
    • getDelimiter

      public byte getDelimiter()
      Returns the field delimiter character. Defaults to ','
      Returns:
      the field delimiter character
    • parseUnescapedQuotes

      public boolean parseUnescapedQuotes()
      Indicates whether the CSV parser should accept unescaped quotes inside quoted values and parse them normally. Defaults to true.
      Returns:
      a flag indicating whether or not the CSV parser should accept unescaped quotes inside quoted values.
    • isHeaderExtractionEnabled

      public boolean isHeaderExtractionEnabled()
      Indicates whether or not the first valid record parsed from the input should be considered as the row containing the names of each column
      Returns:
      true if the first valid record parsed from the input should be considered as the row containing the names of each column, false otherwise
    • getMaxCharsPerColumn

      public long getMaxCharsPerColumn()
    • getNormalizedNewLine

      public byte getNormalizedNewLine()
    • ignoreLeadingWhitespace

      public boolean ignoreLeadingWhitespace()
    • ignoreTrailingWhitespace

      public boolean ignoreTrailingWhitespace()