Profile and feature models¶
Profile models for spec documents.
Profile
¶
Bases: StrictModel
An entry under the top-level ID-keyed profiles object.
grain
class-attribute
instance-attribute
¶
relations
class-attribute
instance-attribute
¶
features
class-attribute
instance-attribute
¶
assembly
class-attribute
instance-attribute
¶
order
class-attribute
instance-attribute
¶
dimension_ids
cached
property
¶
Return dimension identifiers in profile key order.
dimension_id_set
cached
property
¶
Return dimension IDs for repeated scope checks.
all_features
property
¶
Return the declared feature metadata for this profile.
arguments
cached
property
¶
Return compute arguments keyed by operator key and argument name.
feature_producers
cached
property
¶
Return all declared output operators per feature, retaining aliases.
order_dimensions
cached
property
¶
Return normalized order IDs with preceding keys, retaining duplicates.
order_references
cached
property
¶
Return order dimension references for membership checks.
grain_reference_set
cached
property
¶
Return selected dimension-resolution identities.
identifiers
¶
Return only the selected grain columns identifying profile rows.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dimensions
|
Mapping[str, Dimension]
|
Dimension catalog from the owning Spec. |
required |
Returns:
| Type | Description |
|---|---|
list[str]
|
Profile identifier columns in grain order, excluding relations. |
identifier_types
¶
Return logical types for the selected grain identifiers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dimensions
|
Mapping[str, Dimension]
|
Dimension catalog from the owning Spec. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, str]
|
Profile identifier columns mapped to logical types, excluding relations. |
relation_types
¶
Return logical types for resolutions relating this profile to other profiles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dimensions
|
Mapping[str, Dimension]
|
Dimension catalog from the owning Spec. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, str]
|
Declared relation columns mapped to logical types, excluding identifiers. |
keys
¶
Return identifiers and relations in declaration order.
key_types
¶
Return logical types for identifiers and relations together.
generate_name
¶
Generate a display name from the profile ID when one is not supplied.