omni.OmniFilterDefinition
Defines an Omni dashboard filter. Used to populate an OmniFilterSet and generate the filter search params for an embedded dashboard URL.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
field
|
str
|
Name of the Omni field a filter exists for. Generally a dot-path representing a dimension in a view. |
required |
type
|
Type
|
Type of the value to be filtered on. |
required |
operator
|
Operator
|
Type of filter operation to perform. |
equals
|
Attributes:
| Name | Type | Description |
|---|---|---|
field |
str
|
Name of the Omni field a filter exists for. Generally a dot-path representing a dimension in a view. |
type |
Type
|
Type of the value to be filtered on. |
operator |
Operator
|
Type of filter operation to perform. |
Source code in src/omni/embed.py
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 | |
Operator
Bases: Enum
Omni Filter Operator Options
Attributes:
| Name | Type | Description |
|---|---|---|
equals |
EQUALS |
|
less_than |
LESS_THAN |
|
greater_than |
GREATER_THAN |
Source code in src/omni/embed.py
628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 | |
Type
Bases: Enum
Omni Filter Type Options
Attributes:
| Name | Type | Description |
|---|---|---|
number |
number |
|
string |
string |
Source code in src/omni/embed.py
617 618 619 620 621 622 623 624 625 626 | |
get_filter_search_param_info(values)
Returns the key and value to be used in a query string for an Omni Dashboard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
values
|
str | int | float | list[str | int | float]
|
Value or list of values to filter on. |
required |
Returns:
| Type | Description |
|---|---|
tuple[str, list[str]]
|
Key and value to use in the filter search params when building an embedded dashboard URL. |
Source code in src/omni/embed.py
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 | |