dataset_default
dataset_default ¶
a class based approach for interacting with Domo Datasets
DomoDataset_Default
dataclass
¶
DomoDataset_Default(
auth: DomoAuth,
id: str,
raw: dict,
display_type: str = "",
data_provider_type: str = "",
name: str = "",
description: str = "",
row_count: int | None = None,
column_count: int | None = None,
stream_id: int | None = None,
cloud_id: str | None = None,
last_touched_dt: datetime | None = None,
last_updated_dt: datetime | None = None,
created_dt: datetime | None = None,
owner: dict = dict(),
formulas: dict = dict(),
Data: DomoDataset_Data | None = None,
Schema: DomoDataset_Schema | None = None,
Stream: DomoStream | None = None,
Tags: DomoTags | None = None,
PDP: DatasetPdpPolicies | None = None,
Access: DomoDatasetAccessController | None = None,
Formulas: DomoDataset_FormulasManager | None = None,
Certification: DomoCertification | None = None,
AI_Readiness: DomoDataset_AI_Readiness | None = None,
_is_schedule_hydrated: bool = False,
)
Bases: DomoEntity_w_Lineage
interacts with domo datasets
is_federated
property
¶
is_federated: bool
Heuristic: decide if a dataset JSON represents a federated (proxy) dataset.
is_manual
property
¶
is_manual: bool
True when composed schedule resolves to manual execution.
This property is strict by design: callers must either hydrate schedule state first or use async helpers that auto-hydrate.
is_schedule_hydrated
property
¶
is_schedule_hydrated: bool
Whether schedule state has been explicitly hydrated from stream metadata.
is_scheduled
property
¶
is_scheduled: bool
True when composed schedule resolves to scheduled execution.
transport_type
property
¶
transport_type: str | None
Get the transport type of the dataset if available.
Returns None if transport type cannot be determined rather than raising an exception. This allows the property to be safely included in serialization.
duplicate
async
¶
duplicate(
new_name: str | None = None,
*,
new_description: str | None = None,
override_data_provider_key: str | None = None,
override_transport_description: str | None = None,
override_configuration: list[dict] | None = None,
override_account_id: int | None = None,
is_execute: bool = False,
context: RouteContext | None = None,
**context_kwargs
) -> DomoDataset_Default
Duplicate this dataset by creating a new stream+dataset with the same connector config.
Creates a new dataset with the same connector type and configuration as this dataset. Optionally overrides the connector at creation time (useful for creating a dataset with a different connector from the start).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
new_name
|
str | None
|
Name for the new dataset. Defaults to "{current_name} (Copy)". |
None
|
new_description
|
str | None
|
Description for the new dataset. Defaults to current description. |
None
|
override_data_provider_key
|
str | None
|
Override the connector type for the new dataset. Defaults to current stream's dataProvider.key. |
None
|
override_transport_description
|
str | None
|
Override the transport description. Defaults to current stream's transport.description. |
None
|
override_configuration
|
list[dict] | None
|
Override the stream configuration. Defaults to current stream's configuration. |
None
|
override_account_id
|
int | None
|
Account ID for connectors requiring auth. |
None
|
is_execute
|
bool
|
If True, run the stream immediately after creation. |
False
|
context
|
RouteContext | None
|
Optional RouteContext for API call configuration. |
None
|
**context_kwargs
|
Additional context parameters. |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
DomoDataset_Default |
DomoDataset_Default
|
The newly created dataset (hydrated). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If this dataset has no stream (cannot duplicate non-connector datasets this way). |
Stream_CRUD_Error
|
If stream creation fails. |
Example
ds = await DomoDataset.get_by_id(auth, dataset_id="abc123")
Simple duplicate with same connector¶
new_ds = await ds.duplicate()
Duplicate with a different connector¶
new_ds = await ds.duplicate( ... new_name="My Dataset (DomoStats)", ... override_data_provider_key="domostats", ... override_transport_description="com.domo.connector.domostats", ... override_configuration=[ ... {"name": "report", "value": "cards", "type": "string"}, ... ], ... is_execute=True, ... )
Note
Some built-in connectors (like domostats) may reuse existing streams when creating via POST /api/data/v1/streams. If you need a guaranteed new stream, use a connector that creates fresh streams (e.g. governance, third-party connectors).
Source code in src/crew_dcs/classes/DomoDataset/dataset_default.py
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 | |
get_by_id
async
classmethod
¶
get_by_id(
auth: DomoAuth,
dataset_id: str,
debug_api: bool = False,
return_raw: Literal[True] = True,
session: AsyncClient | None = None,
debug_num_stacks_to_drop: int = 2,
is_use_default_dataset_class: bool = False,
parent_class: str | None = None,
is_get_account: bool = True,
is_suppress_no_account_config: bool = True,
check_if_published: bool | None = None,
parent_auth_retrieval_fn: Callable | None = None,
parent_auth: DomoAuth | None = None,
max_subscriptions_to_check: int | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
get_by_id(
auth: DomoAuth,
dataset_id: str,
debug_api: bool = False,
return_raw: Literal[False] = False,
session: AsyncClient | None = None,
debug_num_stacks_to_drop: int = 2,
is_use_default_dataset_class: bool = False,
parent_class: str | None = None,
is_get_account: bool = True,
is_suppress_no_account_config: bool = True,
check_if_published: bool | None = None,
parent_auth_retrieval_fn: Callable | None = None,
parent_auth: DomoAuth | None = None,
max_subscriptions_to_check: int | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
) -> DomoDataset_Default
get_by_id(
auth: DomoAuth,
dataset_id: str,
debug_api: bool = False,
return_raw: bool = False,
session: AsyncClient | None = None,
debug_num_stacks_to_drop: int = 2,
is_use_default_dataset_class: bool = False,
parent_class: str | None = None,
is_get_account: bool = True,
is_suppress_no_account_config: bool = True,
check_if_published: bool | None = None,
parent_auth_retrieval_fn: Callable | None = None,
parent_auth: DomoAuth | None = None,
max_subscriptions_to_check: int | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
)
retrieves dataset metadata
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object for API requests |
required |
dataset_id
|
str
|
Dataset identifier to fetch |
required |
debug_api
|
bool
|
Enable verbose API logging |
False
|
return_raw
|
bool
|
If True return the raw response object |
False
|
check_if_published
|
bool | None
|
When True attempt to resolve publish subscriptions. If None and either parent_auth or parent_auth_retrieval_fn is provided, defaults to True. |
None
|
parent_auth_retrieval_fn
|
Callable | None
|
Callable used to obtain publisher auth for publish checks |
None
|
parent_auth
|
DomoAuth | None
|
Pre-existing publisher auth (alternative to parent_auth_retrieval_fn) |
None
|
max_subscriptions_to_check
|
int | None
|
Optional limit passed to the PublishResolver |
None
|
Source code in src/crew_dcs/classes/DomoDataset/dataset_default.py
579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 | |
get_is_manual
async
¶
get_is_manual() -> bool
Get manual/scheduled state with guaranteed schedule hydration.
Source code in src/crew_dcs/classes/DomoDataset/dataset_default.py
203 204 205 206 | |
get_is_scheduled
async
¶
get_is_scheduled() -> bool
Get scheduled state with guaranteed schedule hydration.
Source code in src/crew_dcs/classes/DomoDataset/dataset_default.py
208 209 210 211 | |
hydrate_schedule_state
async
¶
hydrate_schedule_state(
force_refresh: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> DomoDataset_Default
Hydrate schedule state for this dataset.
Search-index dataset payloads omit streamId and schedule fields, so this
method rehydrates dataset metadata by ID and fetches stream metadata when
available.
Source code in src/crew_dcs/classes/DomoDataset/dataset_default.py
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | |
to_dict ¶
to_dict(
override_fn: Callable | None = None,
return_snake_case: bool = False,
) -> dict
Serialize dataset and composed objects for export/debugging.
Source code in src/crew_dcs/classes/DomoDataset/dataset_default.py
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | |
update_properties
async
¶
update_properties(
name: str | None = None,
description: str | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
)
Update this datasource's name and/or description.
Applies to datasets, dataset views, and data models alike. Updates the
local name/description on success.
Source code in src/crew_dcs/classes/DomoDataset/dataset_default.py
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 | |
DomoDataset_NoTransportType_Error ¶
DomoDataset_NoTransportType_Error(
cls_instance=None, message: str | None = None, **kwargs
)
Bases: ClassError
Raised when unable to determine the transport type of a dataset.
Source code in src/crew_dcs/classes/DomoDataset/dataset_default.py
45 46 47 48 49 | |