DeltaConfig — Configuration Property Of Delta Table (Metadata)

DeltaConfig (of type T) represents a named configuration property of a delta table with values (of type T) in an acceptable range.

DeltaConfig can be read from a metadata.

Creating DeltaConfig Instance

DeltaConfig takes the following to be created:

  • Key

  • Default value

  • Conversion function (from text representation of the DeltaConfig to the type, i.e. String ⇒ T)

  • Validation function (that guards from incorrect values, i.e. T ⇒ Boolean)

  • Help message

  • (optional) Minimum version of protocol supported

DeltaConfig initializes the internal properties.

Reading Configuration Property From Metadata — fromMetaData Method

fromMetaData(
  metadata: Metadata): T

fromMetaData looks up the key in the configuration of the given Metadata. If not found, fromMetaData gives the default value.

In the end, fromMetaData converts the text representation to the proper type using fromString conversion function.

fromMetaData is used when: