AttrEngine.Schema.Attribute.DataConfig (attr_engine v0.3.0)

Copy Markdown View Source

Embedded schema for the data-side configuration of an Attribute.

Captures the structural contract: type, default value, required flag, import-source mapping, relation config, and validation rules.

Fields

  • type — the data type identifier (e.g. "binary", "integer", "relation")
  • required — whether the attribute must have a value
  • has_default / default — whether a default value exists and its shape
  • source_column — which source column this maps to during import
  • relation_config — flexible map for relation settings (target_type, target_set_id, matching_rules, etc.)
  • validations — list of validation rule maps
  • source — data source configuration map

Consumers may store additional ad-hoc keys at the ASA level; those are merged on top by AttrEngine.Cascade at resolution time.

Summary

Functions

Standard changeset — validates required fields and type inclusion.

Returns the list of supported data type identifiers.

Functions

changeset(data_config, attrs)

Standard changeset — validates required fields and type inclusion.

type_options()

@spec type_options() :: [{String.t(), String.t()}]

Returns the list of supported data type identifiers.