|
9 | 9 | from typing import List, Mapping, Optional, Sequence, Tuple, TYPE_CHECKING, Union
|
10 | 10 |
|
11 | 11 | from tableauserverclient.helpers.headers import fix_filename
|
| 12 | +from tableauserverclient.server.query import QuerySet |
12 | 13 |
|
13 | 14 | if TYPE_CHECKING:
|
14 | 15 | from tableauserverclient.server import Server
|
@@ -459,3 +460,87 @@ def schedule_extract_refresh(
|
459 | 460 | self, schedule_id: str, item: DatasourceItem
|
460 | 461 | ) -> List["AddResponse"]: # actually should return a task
|
461 | 462 | return self.parent_srv.schedules.add_to_schedule(schedule_id, datasource=item)
|
| 463 | + |
| 464 | + def filter(self, *invalid, page_size: Optional[int] = None, **kwargs) -> QuerySet[DatasourceItem]: |
| 465 | + """ |
| 466 | + Queries the Tableau Server for items using the specified filters. Page |
| 467 | + size can be specified to limit the number of items returned in a single |
| 468 | + request. If not specified, the default page size is 100. Page size can |
| 469 | + be an integer between 1 and 1000. |
| 470 | +
|
| 471 | + No positional arguments are allowed. All filters must be specified as |
| 472 | + keyword arguments. If you use the equality operator, you can specify it |
| 473 | + through <field_name>=<value>. If you want to use a different operator, |
| 474 | + you can specify it through <field_name>__<operator>=<value>. Field |
| 475 | + names can either be in snake_case or camelCase. |
| 476 | +
|
| 477 | + This endpoint supports the following fields and operators: |
| 478 | +
|
| 479 | +
|
| 480 | + authentication_type=... |
| 481 | + authentication_type__in=... |
| 482 | + connected_workbook_type=... |
| 483 | + connected_workbook_type__gt=... |
| 484 | + connected_workbook_type__gte=... |
| 485 | + connected_workbook_type__lt=... |
| 486 | + connected_workbook_type__lte=... |
| 487 | + connection_to=... |
| 488 | + connection_to__in=... |
| 489 | + connection_type=... |
| 490 | + connection_type__in=... |
| 491 | + content_url=... |
| 492 | + content_url__in=... |
46A6
code> | 493 | + created_at=... |
| 494 | + created_at__gt=... |
| 495 | + created_at__gte=... |
| 496 | + created_at__lt=... |
| 497 | + created_at__lte=... |
| 498 | + database_name=... |
| 499 | + database_name__in=... |
| 500 | + database_user_name=... |
| 501 | + database_user_name__in=... |
| 502 | + description=... |
| 503 | + description__in=... |
| 504 | + favorites_total=... |
| 505 | + favorites_total__gt=... |
| 506 | + favorites_total__gte=... |
| 507 | + favorites_total__lt=... |
| 508 | + favorites_total__lte=... |
| 509 | + has_alert=... |
| 510 | + has_embedded_password=... |
| 511 | + has_extracts=... |
| 512 | + is_certified=... |
| 513 | + is_connectable=... |
| 514 | + is_default_port=... |
| 515 | + is_hierarchical=... |
| 516 | + is_published=... |
| 517 | + name=... |
| 518 | + name__in=... |
| 519 | + owner_domain=... |
| 520 | + owner_domain__in=... |
| 521 | + owner_email=... |
| 522 | + owner_name=... |
| 523 | + owner_name__in=... |
| 524 | + project_name=... |
| 525 | + project_name__in=... |
| 526 | + server_name=... |
| 527 | + server_name__in=... |
| 528 | + server_port=... |
| 529 | + size=... |
| 530 | + size__gt=... |
| 531 | + size__gte=... |
| 532 | + size__lt=... |
| 533 | + size__lte=... |
| 534 | + table_name=... |
| 535 | + table_name__in=... |
| 536 | + tags=... |
| 537 | + tags__in=... |
| 538 | + type=... |
| 539 | + updated_at=... |
| 540 | + updated_at__gt=... |
| 541 | + updated_at__gte=... |
| 542 | + updated_at__lt=... |
| 543 | + updated_at__lte=... |
| 544 | + """ |
| 545 | + |
| 546 | + return super().filter(*invalid, page_size=page_size, **kwargs) |
0 commit comments