[Type 2] Support range filter operators (GreaterThan, LessThan, Between) in PDFRequestOptions.vf() for view filters
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start by reading the PDFRequestOptions.vf() entry point and the existing RequestOptions.filter.add() implementation. Determine how operators and range values should be represented for PDF view filters, then verify the expected behavior for GreaterThan, LessThan, and Between against the described continuous-filter use case.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Add support for range filter operators (GreaterThan, LessThan, Between) in PDF view filters using .vf() method
Request Type
Type 2: add a REST API and support it in tsc.
This is functionality that exists in Tableau dashboards (continuous range filters) but cannot be properly controlled through the PDF generation API.
Description
Current Limitation
When using PDFRequestOptions.vf() to apply view filters for PDF generation, there is no way to specify filter operators such as GreaterThan, LessThan, or Between. The current implementation only supports:
- Single discrete values:
pdf_opts.vf('Region', 'West') - Multiple discrete values (IN operator):
pdf_opts.vf('Category', 'Furniture,Technology') - Ambiguous comma-separated syntax:
pdf_opts.vf('Score', '10,50')
Problem
For continuous range filters configured in Tableau dashboards, the comma-separated syntax '10,50' is ambiguous and may be interpreted as:
IN (10, 50)- only values exactly 10 or 50BETWEEN 10 AND 50- range from 10 to 50
Currently, there is no way to explicitly specify that a filter should use BETWEEN, GreaterThan, or other range operators, even though these filters work perfectly when using the dashboard interactively.
Proposed Solution
Add operator support to .vf() similar to how RequestOptions.filter.add() works for API queries:
Current API (RequestOptions filtering):
req_option = TSC.RequestOptions()
req_option.filter.add(TSC.Filter(
TSC.RequestOptions.Field.Score,
TSC.RequestOptions.Operator.GreaterThanOrEqual,
'10'
))
Proposed enhancement for PDF view filters:
pdf_opts = TSC.PDFRequestOptions()
pdf_opts.vf('SCORE', '10', operator=TSC.RequestOptions.Operator.GreaterThanOrEqual)
# OR
pdf_opts.vf('SCORE', min_value='10', max_value='50') # For BETWEEN
Use Case & Value
- Frequency: This is needed any time programmatic PDF generation requires filtering on continuous numeric or date fields
- Current workaround: None - users must either accept ambiguous behavior or modify dashboard filters, which affects all users
- Work saved: Eliminates need to create separate dashboards with hardcoded filters just for PDF generation
- Business impact: Critical for automated reporting where PDFs need to show data for specific ranges (e.g., "Show only high-risk scores 80-100", "Show sales data > $1M")
Example Scenario
A Tableau dashboard has a continuous slider filter for SCORE (range: 0-100). When generating automated weekly PDFs:
- Needed: Filter to show only scores BETWEEN 10 AND 50
- Current behavior: Passing
[10, 50]may show only exact values 10 and 50 - Expected behavior: Should show all values in the range 10-50, just like moving the slider in the web UI
This feature would bring view filter capabilities in line with the existing RequestOptions.filter API and match the functionality available in the Tableau web interface.
- Ngôn ngữ chính
- Python
- Star
- 716
- Fork
- 446
- Merge trung bình
- 8 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 2
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tableau/server-client-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
tableau/server-client-python#1865 ·
-
in-progress
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
tableau/server-client-python#1829 · 1 bình luận ·
-
enhancement gap needs investigation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tableau/server-client-python#1322 · 1 bình luận ·
-
[Type2] Allow Incremental Refresh type schedules to be added via `server.schedules.add_to_schedule` Đang mởhelp wanted Server-Side Enhancement ui-exists
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tableau/server-client-python#1101 · 3 bình luận ·
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tableau/server-client-python#783 · 5 bình luận ·
Tất cả issue của tableau/server-client-python
Issue tương tự
-
货币战争手改优先级配置缺少列表元素类型校验(P3) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Đang mởarea: ci bug perceived difficulty: 3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ClickHouse/clickhouse-connect#1057 ·