manager_formulas
manager_formulas ¶
Formulas manager for DomoDataset.
Provides access to beast mode (calculated field) templates that are persisted on a dataset — i.e., beast modes saved to the dataset level rather than defined on individual cards.
These dataset-level beast modes are referenced by their calculation_xxx
legacy ID in card definitions but their formula text and column references
live in the template API (/api/query/v1/functions/template/{id}).
Usage
await dataset.Formulas.get() dataset.Formulas.beast_modes # list[DomoBeastMode] dataset.Formulas.resolve_calculation_id("calculation_xxx") # BeastModeTemplate | None
DomoDataset_FormulasManager
dataclass
¶
DomoDataset_FormulasManager(
parent: DomoEntity,
beast_modes: list[DomoBeastMode] = list(),
)
Bases: DomoSubEntity
Manager for beast modes persisted on a dataset.
Provides typed access to dataset-level beast modes and resolution of calculation IDs used in card definitions.
Usage
await dataset.Formulas.get() dataset.Formulas.beast_modes # list[DomoBeastMode] dataset.Formulas.resolve_calculation_id("calculation_xxx")
formula_by_legacy_id
property
¶
formula_by_legacy_id: dict[str, BeastModeTemplate]
Lookup dict of templates by their legacy calculation ID.
get
async
¶
get(
include_hidden: bool = False,
is_resolve_domo_beast_mode_refs: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[DomoBeastMode]
Fetch beast modes saved to this dataset.
Retrieves the list of beast modes linked to this dataset, then optionally fetches each template definition.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_hidden
|
bool
|
Fetch template definitions with ?hidden=true |
False
|
is_resolve_domo_beast_mode_refs
|
bool
|
Also resolve |
False
|
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
Returns:
| Type | Description |
|---|---|
list[DomoBeastMode]
|
List of DomoBeastMode instances with populated templates. |
Source code in src/crew_dcs/classes/DomoDataset/manager_formulas.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
resolve_calculation_id ¶
resolve_calculation_id(
calculation_id: str,
) -> BeastModeTemplate | None
Resolve a calculation_xxx ID to its template definition.
Card definitions reference dataset-level beast modes by their legacyId (e.g., "calculation_628752ca-a54d-44c6-a24f-4f4b45c049ff"). This method looks up the template by that ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculation_id
|
str
|
The calculation_xxx legacy ID |
required |
Returns:
| Type | Description |
|---|---|
BeastModeTemplate | None
|
BeastModeTemplate if found, None otherwise |
Source code in src/crew_dcs/classes/DomoDataset/manager_formulas.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |