07 · Tables A→ZE · Govern with column domains
List allowed values
Read a column's permitted domain values - and the parent UUIDs hierarchical domains need.
get_allowed_values returns a column's configured domain values. You'll use it
two ways: to inspect a domain, and to get the parent UUIDs required when
building a hierarchical domain.
Read a fixed domain
get_allowed_values(table, "status")
# -> [{ "id": "…", "value": "active" }, { "id": "…", "value": "inactive" }, …]CLI: eddytor get domain-values eddytor sales orders status.
Each entry has an id (UUID) and a value. The id is what hierarchical
child domains key on.
Read children for a parent
For a hierarchical column, scope to one parent value:
get_allowed_values(table, "subcategory", parent_value="Electronics")
# -> the child values allowed under "Electronics"Why the UUIDs matter
When you set a hierarchical domain, the hierarchy
map is keyed by the parent value's UUID - so you call get_allowed_values on
the parent column first to read those ids, then build the mapping. A string key is
rejected.
Good to know
Use this to inspect an existing domain before modifying it -
remember that
set_column_domain's hierarchy replaces the whole mapping, so
read the current values first to avoid dropping pairs.