Enum WriteDisposition

java.lang.Object
java.lang.Enum<WriteDisposition>
io.github.flink.gcp.connector.bigquery.sink.WriteDisposition
All Implemented Interfaces:
Serializable, Comparable<WriteDisposition>, java.lang.constant.Constable

@Public public enum WriteDisposition extends Enum<WriteDisposition>
How data lands in a destination table that already contains data. Mirrors the BigQuery load-job write dispositions; only WriteMethod.FILE_LOADS consults it (the Storage Write API methods always append).
  • Enum Constant Details

    • WRITE_APPEND

      public static final WriteDisposition WRITE_APPEND
      Appends loaded rows to the existing table data. The default.
    • WRITE_TRUNCATE

      public static final WriteDisposition WRITE_TRUNCATE
      Replaces the existing table data (and schema) with the loaded rows.
    • WRITE_TRUNCATE_DATA

      public static final WriteDisposition WRITE_TRUNCATE_DATA
      Replaces the existing table data while preserving the table schema and constraints.
    • WRITE_EMPTY

      public static final WriteDisposition WRITE_EMPTY
      Fails the load when the destination table is not empty.
  • Method Details

    • values

      public static WriteDisposition[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static WriteDisposition valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Returns the hyphenated lower-case spelling this constant takes in a sink.file-loads.write-disposition DDL option, for example write-truncate.

      Flink resolves an enum-valued ConfigOption by matching this string case-insensitively and normalizing nothing else, so the DDL vocabulary is defined here rather than by a table-local copy of the enum. Use Enum.name() where a message means the Java constant.

      Overrides:
      toString in class Enum<WriteDisposition>