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
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 350 351 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 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 | |
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
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 | |
Type
Bases: Enum
Omni Filter Type Options
Attributes:
| Name | Type | Description |
|---|---|---|
number |
number |
|
string |
string |
Source code in src/omni/embed.py
331 332 333 334 335 336 337 338 339 340 | |
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
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 | |