Skip to content

fix: handle parameters for view filters - #1633

Merged
jacalata merged 10 commits into
tableau:developmentfrom
jorwoods:jorwoods/vf_params
Jan 14, 2026
Merged

fix: handle parameters for view filters#1633
jacalata merged 10 commits into
tableau:developmentfrom
jorwoods:jorwoods/vf_params

Conversation

@jorwoods

Copy link
Copy Markdown
Contributor

Closes#1632

Parameters need to be prefixed with "vf_Parameters." in order to be properly registered as setting a parameter value. This PR adds that prefix where it was missing, but leaves parameter names that already included the prefix unmodified.

@jacalatajacalata self-assigned this Aug 1, 2025
@jorwoodsjorwoods mentioned this pull request Aug 1, 2025
@jorwoods
jorwoodsforce-pushed the jorwoods/vf_params branch 2 times, most recently from 84a0863 to 848c44fCompareOctober 17, 2025 22:28
@jacalata
jacalata requested a review from CopilotOctober 29, 2025 04:58

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds automatic prefixing of parameter names with vf_Parameters. to ensure consistent formatting when using the parameter() method. The changes handle three scenarios: plain parameter names get the full prefix added, names starting with "Parameters." get "vf_" prepended, and names already prefixed with "vf_Parameters." are left unchanged.

  • Automatic prefixing logic for parameter names in the parameter() method
  • Support for flexible parameter name input formats
  • Updated test cases to verify the new prefixing behavior

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

FileDescription
tableauserverclient/server/request_options.pyAdded prefix normalization logic to handle different parameter name formats
test/test_request_option.pyAdded new test cases for different parameter name prefixes and updated assertions to expect normalized parameter names

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadtableauserverclient/server/request_options.py
Comment threadtableauserverclient/server/request_options.py
@jorwoods

Copy link
Copy Markdown
ContributorAuthor

To restate on the PR: copilot recommends changing "vf_Parameters" to "vf_parameters". But the Tableau Server query parameter is case sensitive, so it has to be "vf_Parameters". Below is a sample script I used to test this.

importosfromdotenvimportload_dotenvimporttableauserverclientasTSCload_dotenv()
server=TSC.Server(os.environ["TABLEAU_SERVER"], use_server_version=True)
auth=TSC.PersonalAccessTokenAuth(os.environ["TOKEN_NAME"], os.environ["TOKEN_SECRET"], site_id=os.environ["TABLEAU_SITE"])
withserver.auth.sign_in(auth):
view=server.views.filter(name="test", workbook_name="Superstore", project_name="Samples")[0]
opts=TSC.CSVRequestOptions()
opts.parameter("Check", "sent")
server.views.populate_csv(view, opts)
forlineinview.csv:
print(line.decode("utf-8").strip())

Closestableau#1632
Parameters need to be prefixed with "vf_Parameters." in order
to be properly registered as setting a parameter value. This PR
adds that prefix where it was missing, but leaves parameter names
that already included the prefix unmodified.
@jorwoods

Copy link
Copy Markdown
ContributorAuthor

This is now a stacked PR, dependent upon #1695

@jacalatajacalata left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was confused because this didn't change - I was just so used to using the workaround that I thought the functionality had existed already.

@jacalata
jacalata merged commit 6f525ff into tableau:developmentJan 14, 2026
25 checks passed
jacalata added a commit that referenced this pull request Feb 2, 2026
* feat: New APIs: Update multiple connections in a single workbook/datasource (#1638)
* feat: enable toggling attribute capture for a site (#1619)
* feat: support OIDC endpoints (#1630)
* feat: add WebAuthoringForFlows capability to Permission class (#1642) * feat: support collections in favorites (#1647)
* feat: Add UAT (unified access token) support to JWT login (#1671)
* feat: Update permissions_item.py --added ExtractRefresh attribute (#1617) (#1669)
* feat: make refresh consistent between endpoints (#1665)
* feat: make ResourceReference hashable (#1668) Closes#1666
* feat: delete view (#1712)
* feat: batch create schedule (#1714)
* feat: users csv import (#1409)
* feat: implement users bulk_remove
* feat: enable idp_configuration_id in bulk_add
* feat: support extensions api (#1672)
* feat: Add support for receiving "Customized Monthly" schedule intervals (#1670)
* feat: implement #816: project.get_by_id (#1736)
* fix: put special fields first (#1622) Closes#1620
* fix: virtual connections username (#1628) Closes#1626
* fix: add contentType to tags batch actions (#1643)
* fix: datasource owner/project missing parsing (#1700)
* fix: datasource description update and publish (#1682)
* fix: windows decoding error
* fix: assert on warning instead of ignore
* fix: add workbook and view setter for custom view (#1730)
* fix: handle parameters for view filters (#1633)
* fix: handle parameters for view filters Closes#1632
jacalata pushed a commit that referenced this pull request Feb 3, 2026
* fix: black ci errors
* chore: pytestify request_option
* fix: encoding error
* fix: handle parameters for view filters
Closes#1632
Parameters need to be prefixed with "vf_Parameters." in order
to be properly registered as setting a parameter value. This PR
adds that prefix where it was missing, but leaves parameter names
that already included the prefix unmodified.
* docs: case sensitivity in the test's query string
* chore: pytest style asserts
* fix: black ci errors
---------
Co-authored-by: Jordan Woods <13803242+jorwoods@users.noreply.github.com>
jacalata pushed a commit that referenced this pull request Feb 3, 2026
* fix: black ci errors
* chore: pytestify request_option
* fix: encoding error
* fix: handle parameters for view filters
Closes#1632
Parameters need to be prefixed with "vf_Parameters." in order
to be properly registered as setting a parameter value. This PR
adds that prefix where it was missing, but leaves parameter names
that already included the prefix unmodified.
* docs: case sensitivity in the test's query string
* chore: pytest style asserts
* fix: black ci errors
---------
Co-authored-by: Jordan Woods <13803242+jorwoods@users.noreply.github.com>
vchavatapalli pushed a commit to vchavatapalli/server-client-python that referenced this pull request May 5, 2026
* feat: New APIs: Update multiple connections in a single workbook/datasource (tableau#1638)
* feat: enable toggling attribute capture for a site (tableau#1619)
* feat: support OIDC endpoints (tableau#1630)
* feat: add WebAuthoringForFlows capability to Permission class (tableau#1642) * feat: support collections in favorites (tableau#1647)
* feat: Add UAT (unified access token) support to JWT login (tableau#1671)
* feat: Update permissions_item.py --added ExtractRefresh attribute (tableau#1617) (tableau#1669)
* feat: make refresh consistent between endpoints (tableau#1665)
* feat: make ResourceReference hashable (tableau#1668) Closestableau#1666
* feat: delete view (tableau#1712)
* feat: batch create schedule (tableau#1714)
* feat: users csv import (tableau#1409)
* feat: implement users bulk_remove
* feat: enable idp_configuration_id in bulk_add
* feat: support extensions api (tableau#1672)
* feat: Add support for receiving "Customized Monthly" schedule intervals (tableau#1670)
* feat: implement tableau#816: project.get_by_id (tableau#1736)
* fix: put special fields first (tableau#1622) Closestableau#1620
* fix: virtual connections username (tableau#1628) Closestableau#1626
* fix: add contentType to tags batch actions (tableau#1643)
* fix: datasource owner/project missing parsing (tableau#1700)
* fix: datasource description update and publish (tableau#1682)
* fix: windows decoding error
* fix: assert on warning instead of ignore
* fix: add workbook and view setter for custom view (tableau#1730)
* fix: handle parameters for view filters (tableau#1633)
* fix: handle parameters for view filters Closestableau#1632
@jorwoods
jorwoods deleted the jorwoods/vf_params branch June 9, 2026 19:28
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

View Filters on parameters

3 participants

@jorwoods@jacalata