Skip to content

Constraints Utility

Extracting Constraints from Table Metadata

getAll(
  metadata: Metadata,
  spark: SparkSession): Seq[Constraint]

getAll extracts Constraints from the given metadata and the associated schema.

getAll is used when:

Extracting Check Constraints from Table Metadata

getCheckConstraints(
  metadata: Metadata,
  spark: SparkSession): Seq[Constraint]

getCheckConstraints extracts Check constraints from the delta.constraints.-keyed entries in the configuration of the given Metadata:

  • The name is the key without the delta.constraints. prefix
  • The expression is the value parsed

getCheckConstraints is used when:


Last update: 2021-06-28
Back to top