datacenter
datacenter ¶
Datacenter Package
This package provides datacenter management functionality for searching, lineage, and sharing.
Modules:
| Name | Description |
|---|---|
exceptions |
Exception classes for datacenter operations |
core |
Core datacenter functions, enums, and utilities |
DatacenterGetError ¶
DatacenterGetError(
res=None, message: str | None = None, **kwargs
)
Bases: RouteError
Raised when datacenter retrieval operations fail.
Source code in src/crew_dcs/routes/datacenter/exceptions.py
36 37 38 39 40 41 42 43 44 45 46 | |
Lineage_Entity_Type_Enum ¶
Bases: DomoEnumMixin, Enum
Entity types accepted by the lineage API.
Note: These differ from Datacenter_Enum values. The API expects uppercase with underscores (DATA_SOURCE, not DATASET).
SearchDatacenterNoResultsFoundError ¶
SearchDatacenterNoResultsFoundError(
res=None, message: str | None = None, **kwargs
)
Bases: RouteError
Raised when datacenter search operations return no results.
Source code in src/crew_dcs/routes/datacenter/exceptions.py
20 21 22 23 24 25 26 27 28 29 30 | |
ShareResourceError ¶
ShareResourceError(
message: str | None = None,
domo_instance: str | None = None,
parent_class: str | None = None,
function_name: str | None = None,
res=None,
**kwargs
)
Bases: RouteError
Raised when resource sharing operations fail.
Source code in src/crew_dcs/routes/datacenter/exceptions.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
generate_data_center_profile_body ¶
generate_data_center_profile_body(
*,
entity_type: (
str | Datacenter_Enum | list[Datacenter_Enum]
),
filters: list[dict],
maximum: int | None,
offset: int = 0
) -> dict
Generate DATA_CENTER profile body for search/v1/query requests.
Source code in src/crew_dcs/routes/datacenter/core.py
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | |
generate_search_datacenter_account_body ¶
generate_search_datacenter_account_body(
search_str: str, is_exact_match: bool = True
) -> dict
Generate body for datacenter account search.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
search_str
|
str
|
String to search for |
required |
is_exact_match
|
bool
|
Whether to require exact match |
True
|
Returns:
| Type | Description |
|---|---|
dict
|
Dictionary containing account search body |
Source code in src/crew_dcs/routes/datacenter/core.py
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | |
generate_search_datacenter_body ¶
generate_search_datacenter_body(
search_text: str | None = None,
entity_type: (
str | Datacenter_Enum | list[Datacenter_Enum]
) = "DATASET",
additional_filters_ls: list[dict] | None = None,
combineResults: bool = True,
limit: int = 100,
offset: int = 0,
) -> dict
Generate complete body for datacenter search request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
search_text
|
str | None
|
Optional search text to filter results |
None
|
entity_type
|
str | Datacenter_Enum | list[Datacenter_Enum]
|
Type(s) of entities to search for |
'DATASET'
|
additional_filters_ls
|
list[dict] | None
|
Additional filters to apply |
None
|
combineResults
|
bool
|
Whether to combine results |
True
|
limit
|
int
|
Maximum number of results |
100
|
offset
|
int
|
Offset for pagination |
0
|
Returns:
| Type | Description |
|---|---|
dict
|
Dictionary containing complete search body |
Raises:
| Type | Description |
|---|---|
ValueError
|
If entity_type is not a string or Datacenter_Enum |
Source code in src/crew_dcs/routes/datacenter/core.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 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 | |
generate_search_datacenter_filter ¶
generate_search_datacenter_filter(
field: str | Datacenter_Filter_Field_Enum,
value: str | Enum,
is_not: bool = False,
) -> dict
Generate a filter object for datacenter search.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
field
|
str | Datacenter_Filter_Field_Enum
|
Field to filter on (string or enum) |
required |
value
|
str | Enum
|
Value to filter for (string or enum) |
required |
is_not
|
bool
|
Whether to negate the filter |
False
|
Returns:
| Type | Description |
|---|---|
dict
|
Dictionary containing filter specification |
Source code in src/crew_dcs/routes/datacenter/core.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | |
generate_search_datacenter_filter_search_term ¶
generate_search_datacenter_filter_search_term(
search_term: str,
) -> dict
Generate a search term filter for datacenter search.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
search_term
|
str
|
Text to search for |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Dictionary containing search term filter |
Source code in src/crew_dcs/routes/datacenter/core.py
182 183 184 185 186 187 188 189 190 191 | |
generate_search_datacenter_filters ¶
generate_search_datacenter_filters(
filter_specs: list[
tuple[object | None, Callable[[object], dict]]
],
) -> list[dict]
Build datacenter filters from declarative (value, builder) specs.
Source code in src/crew_dcs/routes/datacenter/core.py
250 251 252 253 254 255 256 257 258 | |
generate_semantic_model_search_body ¶
generate_semantic_model_search_body(
*,
filters: list[dict] | None = None,
last_updated_bucket: str | None = None,
maximum: int | None = None,
offset: int = 0
) -> dict
Generate a SEMANTIC_MODEL profile body for search/v1/query.
Semantic models (a.k.a. data models) are DATASET entities surfaced under
the SEMANTIC_MODEL query profile and the "Semantic Model" data-provider
facet. This mirrors generate_data_center_profile_body but pins the
semantic-model profile + facet filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filters
|
list[dict] | None
|
Extra filters to append (term/dateBucket/etc.) |
None
|
last_updated_bucket
|
str | None
|
Optional |
None
|
maximum
|
int | None
|
Maximum number of results (clamped to 100 per request) |
None
|
offset
|
int
|
Pagination offset |
0
|
Returns:
| Type | Description |
|---|---|
dict
|
Dictionary containing the complete search body |
Source code in src/crew_dcs/routes/datacenter/core.py
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 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 | |
get_connectors
async
¶
get_connectors(
auth: DomoAuth,
search_text: str | None = None,
additional_filters_ls: list[dict] | None = None,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Retrieve available connectors from datacenter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object |
required |
search_text
|
str | None
|
Optional text to filter connectors |
None
|
additional_filters_ls
|
list[dict] | None
|
Additional filters to apply |
None
|
return_raw
|
bool
|
Return raw response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters (session, debug_api, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing connector list |
Raises:
| Type | Description |
|---|---|
SearchDatacenter_NoResultsFound
|
If no connectors found |
Datacenter_GET_Error
|
If connector retrieval fails |
Source code in src/crew_dcs/routes/datacenter/core.py
537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 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 | |
get_lineage_upstream
async
¶
get_lineage_upstream(
auth: DomoAuth,
entity_type: str | Lineage_Entity_Type_Enum,
entity_id: str,
return_raw: bool = False,
max_depth: int | None = None,
traverse_up: bool = True,
traverse_down: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Get lineage for a datacenter entity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object |
required |
entity_type
|
str | Lineage_Entity_Type_Enum
|
Type of entity (use Lineage_Entity_Type_Enum for valid values) |
required |
entity_id
|
str
|
ID of the entity |
required |
return_raw
|
bool
|
Return raw response without processing |
False
|
max_depth
|
int | None
|
Maximum depth to traverse. Limits how many levels to include. None = unlimited depth. |
None
|
traverse_up
|
bool
|
If True, traverse upstream (parents/dependencies). |
True
|
traverse_down
|
bool
|
If True, traverse downstream (children/dependents). |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters (session, debug_api, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing lineage data |
Raises:
| Type | Description |
|---|---|
Datacenter_GET_Error
|
If lineage retrieval fails |
Source code in src/crew_dcs/routes/datacenter/core.py
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 | |
search_datacenter
async
¶
search_datacenter(
auth: DomoAuth,
maximum: int | None = None,
body: dict | None = None,
search_text: str | None = None,
entity_type: str | list = "dataset",
additional_filters_ls: list | None = None,
arr_fn: Callable | None = None,
debug_loop: bool = False,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Search across datacenter entities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object |
required |
maximum
|
int | None
|
Maximum number of results to return |
None
|
body
|
dict | None
|
Pre-built search body (optional) |
None
|
search_text
|
str | None
|
Text to search for |
None
|
entity_type
|
str | list
|
Type(s) of entities to search |
'dataset'
|
additional_filters_ls
|
list | None
|
Additional filters to apply |
None
|
arr_fn
|
Callable | None
|
Function to extract array from response |
None
|
debug_loop
|
bool
|
Enable loop debugging |
False
|
return_raw
|
bool
|
Return raw response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters (session, debug_api, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing search results |
Raises:
| Type | Description |
|---|---|
SearchDatacenter_NoResultsFound
|
If search returns no results |
Datacenter_GET_Error
|
If search operation fails |
Source code in src/crew_dcs/routes/datacenter/core.py
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 | |
search_semantic_models
async
¶
search_semantic_models(
auth: DomoAuth,
maximum: int | None = None,
last_updated_bucket: str | None = None,
additional_filters_ls: list[dict] | None = None,
body: dict | None = None,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Search Domo semantic models (data models) via the SEMANTIC_MODEL profile.
A semantic model is a DATASET-entity datasource of type data-model;
this searches them through the SEMANTIC_MODEL query profile + the
"Semantic Model" data-provider facet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object |
required |
maximum
|
int | None
|
Maximum number of results to return |
None
|
last_updated_bucket
|
str | None
|
Optional |
None
|
additional_filters_ls
|
list[dict] | None
|
Extra filters to append to the body |
None
|
body
|
dict | None
|
Pre-built search body (overrides the generated one) |
None
|
return_raw
|
bool
|
Return raw response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters (session, debug_api, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData containing the matching semantic-model search objects |
Raises:
| Type | Description |
|---|---|
SearchDatacenterNoResultsFoundError
|
If search returns no results |
DatacenterGetError
|
If the search operation fails |
Source code in src/crew_dcs/routes/datacenter/core.py
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 532 533 534 | |
share_resource
async
¶
share_resource(
auth: DomoAuth,
resource_ids: list | str | int,
resource_type: ShareResource_Enum,
group_ids: list | str | int | None = None,
user_ids: list | str | int | None = None,
message: str | None = None,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Share a page or card with users or groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object |
required |
resource_ids
|
list | str | int
|
ID(s) of resources to share |
required |
resource_type
|
ShareResource_Enum
|
Type of resource (ShareResource_Enum enum) |
required |
group_ids
|
list | str | int | None
|
ID(s) of groups to share with |
None
|
user_ids
|
list | str | int | None
|
ID(s) of users to share with |
None
|
message
|
str | None
|
Optional message to include in notification email |
None
|
return_raw
|
bool
|
Return raw response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters (session, debug_api, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object with success message |
Raises:
| Type | Description |
|---|---|
ShareResource_Error
|
If sharing operation fails |
Example body format
{ "resources": [ { "type": "page", "id": {page_id} } ], "recipients": [ { "type": "group", "id": "{group_id}" } ], "message": "I thought you might find this page interesting." }
Source code in src/crew_dcs/routes/datacenter/core.py
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 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 | |