core
core ¶
DomoDataflow
dataclass
¶
DomoDataflow(
auth: DomoAuth,
id: str,
raw: dict,
name: str | None = None,
owner: str | None = None,
description: str | None = None,
tags: list[str] | None = None,
version_id: int | None = None,
version_number: int | None = None,
versions: list[dict[str, Any]] | None = None,
jupyter_workspace_config: dict | None = None,
Definition: DomoDataflow_Definition | None = None,
History: DomoDataflow_History | None = None,
JupyterWorkspace: DomoJupyterWorkspace | None = None,
)
Bases: DomoEntity_w_Lineage
entity_name
property
¶
entity_name: str
Get the display name for this dataflow.
Dataflows use the 'name' field as their display name.
Returns:
| Type | Description |
|---|---|
str
|
Dataflow name, or dataflow ID as fallback |
optimize_canvas
async
¶
optimize_canvas(
save: bool = True,
add_sections: bool = True,
debug_api: bool = False,
session: AsyncClient | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
)
Fetch definition, optimize canvas layout, and optionally save.
Convenience method that ensures the definition is loaded, runs the layout optimizer, and optionally saves the result back to the Domo API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
save
|
bool
|
Whether to save after optimizing (default True). |
True
|
add_sections
|
bool
|
Whether to create auto-sections (default True). |
True
|
debug_api
|
bool
|
Enable debug logging for API calls. |
False
|
session
|
AsyncClient | None
|
Optional httpx client session. |
None
|
context
|
RouteContext | None
|
Optional RouteContext for the request. |
None
|
**context_kwargs
|
Additional context parameters. |
{}
|
Returns:
| Type | Description |
|---|---|
|
The modified CanvasElements instance. |
Example::
canvas = await dataflow.optimize_canvas(save=True, add_sections=True)
Source code in src/crew_dcs/classes/DomoDataflow/core.py
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 | |