Record Class CsvFormatOptions

java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.datasource.csv.CsvFormatOptions
Record Components:
delimiter - field separator character (default: comma)
quoteChar - character used to quote fields (default: double-quote)
escapeChar - character used to escape special characters (default: backslash)
commentPrefix - prefix for comment lines to skip (default: "//")
nullValue - string representation of null in the data (default: empty string)
encoding - character encoding of the input (default: UTF-8)
datetimeFormatter - custom datetime format pattern, or null for ISO-8601/epoch
maxFieldSize - maximum size in bytes for a single field value; 0 means no limit (default: 10MB). Provides OOM protection against malformed files.
multiValueSyntax - syntax for multi-value fields: BRACKETS (default, [a,b,c]) or NONE

public record CsvFormatOptions(char delimiter, char quoteChar, char escapeChar, String commentPrefix, String nullValue, Charset encoding, DateTimeFormatter datetimeFormatter, int maxFieldSize, CsvFormatOptions.MultiValueSyntax multiValueSyntax) extends Record
Configurable options for CSV/TSV parsing.
  • Field Details

  • Constructor Details

    • CsvFormatOptions

      public CsvFormatOptions(char delimiter, char quoteChar, char escapeChar, String commentPrefix, String nullValue, Charset encoding, DateTimeFormatter datetimeFormatter, int maxFieldSize, CsvFormatOptions.MultiValueSyntax multiValueSyntax)
      Creates an instance of a CsvFormatOptions record class.
      Parameters:
      delimiter - the value for the delimiter record component
      quoteChar - the value for the quoteChar record component
      escapeChar - the value for the escapeChar record component
      commentPrefix - the value for the commentPrefix record component
      nullValue - the value for the nullValue record component
      encoding - the value for the encoding record component
      datetimeFormatter - the value for the datetimeFormatter record component
      maxFieldSize - the value for the maxFieldSize record component
      multiValueSyntax - the value for the multiValueSyntax record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • delimiter

      public char delimiter()
      Returns the value of the delimiter record component.
      Returns:
      the value of the delimiter record component
    • quoteChar

      public char quoteChar()
      Returns the value of the quoteChar record component.
      Returns:
      the value of the quoteChar record component
    • escapeChar

      public char escapeChar()
      Returns the value of the escapeChar record component.
      Returns:
      the value of the escapeChar record component
    • commentPrefix

      public String commentPrefix()
      Returns the value of the commentPrefix record component.
      Returns:
      the value of the commentPrefix record component
    • nullValue

      public String nullValue()
      Returns the value of the nullValue record component.
      Returns:
      the value of the nullValue record component
    • encoding

      public Charset encoding()
      Returns the value of the encoding record component.
      Returns:
      the value of the encoding record component
    • datetimeFormatter

      public DateTimeFormatter datetimeFormatter()
      Returns the value of the datetimeFormatter record component.
      Returns:
      the value of the datetimeFormatter record component
    • maxFieldSize

      public int maxFieldSize()
      Returns the value of the maxFieldSize record component.
      Returns:
      the value of the maxFieldSize record component
    • multiValueSyntax

      public CsvFormatOptions.MultiValueSyntax multiValueSyntax()
      Returns the value of the multiValueSyntax record component.
      Returns:
      the value of the multiValueSyntax record component