Filter parameters in live connection are ignored during PDF or CSV generation
还没有人认领这个 Issue。
评估
调研方向
Start by reproducing the issue with the provided Python snippet against a workbook using both Impala extract and Oracle live connections. Compare PDF or CSV output when the extract and live-connection filters are supplied through PDFRequestOptions; done means all specified filters affect the generated file. Check the seven existing comments for additional reproduction details before choosing an implementation path.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
Our workbooks contain data sources in extract mode for performance optimization. However, some data sources that are required for annotating the data need to remain in live connection mode to enhance the user experience. When we generate a pdf or csv from a view using the TSC package, all parameters in the extract are considered by the code, but the filters specific to selecting data in the live connection are ignored.
Versions
Details of your environment, including:
- REST API version: 3.21
- Python version: 3.9
- TSC library version: 0.31
To Reproduce
Steps to reproduce the behavior. Please include a code snippet where possible.
We have a workbook with Impala connection (Extract) and oracle connection (Live connection).
Python code:
import tableauserverclient as TSC
SERVER_URL = 'your_server_url'
TOKEN_NAME = 'your_token_name'
TOKEN_VALUE = 'your_token_value'
SITE_NAME = 'your_site_name'
VIEW_NAME = 'your_view_name'
WORKBOOK_ID= 'your_workbook_id'
# initiate server connection
server = TSC.Server(SERVER_URL, use_server_version=True)
# Use Personal Access Token for authentication
tableau_auth = TSC.PersonalAccessTokenAuth(token_name=TOKEN_NAME, personal_access_token=TOKEN_VALUE,
site_id=SITE_NAME)
server.add_http_options({'verify': False})
server.version = '3.21'
server.auth.sign_in(tableau_auth)
# get workbook object
workbook = server.workbooks.get_by_id(WORKBOOK_ID)
# populate view and specify filter parameters on the worksheet
server.workbooks.populate_views(workbook)
# Find the specific view by name
view = next((v for v in workbook.views if v.name == VIEW_NAME), None)
req = TSC.PDFRequestOptions(maxage=-1, page_type='unspecified', orientation='landscape', viz_width=1200,
viz_height=1000)
req.vf('country', 'Germany') # parameter in extract
req.vf('company', 'abc') # parameter in extract
req.vf('selected', 1) # parameter in live connection
# populate pdf file
server.views.populate_pdf(view, req_options=req)
# write pdf file
output_file = "test.pdf"
with open(output_file, 'wb') as file:
file.write(view.pdf)
Results
What are the results or error messages received?
The PDF generated with the above code produces a report that ignores the "selected" parameter. The expected behavior is that the PDF should be generated considering all specified parameters, including those associated with the live connection.
NOTE: Be careful not to post user names, passwords, auth tokens or any other private or sensitive information.
- 主要语言
- Python
- 星标
- 716
- 派生
- 446
- 平均合并
- 8 天 8 小时
- 30 天内合并 PR
- 2
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
tableau/server-client-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
tableau/server-client-python#1865 ·
-
in-progress
难度 2/5 1-3 小时 新手友好度 78/100
tableau/server-client-python#1829 · 1 条评论 ·
-
enhancement gap needs investigation
难度 2/5 1-3 小时 新手友好度 68/100
tableau/server-client-python#1322 · 1 条评论 ·
-
[Type2] Allow Incremental Refresh type schedules to be added via `server.schedules.add_to_schedule` 未关闭help wanted Server-Side Enhancement ui-exists
难度 2/5 1-3 小时 新手友好度 68/100
tableau/server-client-python#1101 · 3 条评论 ·
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 68/100
tableau/server-client-python#783 · 5 条评论 ·
查看 tableau/server-client-python 的全部 Issue
相似的 Issue
-
link-check link-check:sphinx-theme
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
难度 2/5 1-3 小时 新手友好度 88/100
OpenHands/extensions#626 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
CSCfi/sd-search-api#39 ·
-
难度 1/5 1 小时以内 新手友好度 90/100