Skip to content

Fix the populate_excel example and the user domain_name docs - #1911

Open
jacalata wants to merge 2 commits into
gh-pagesfrom
jac/docs-excel-example-user-domain
Open

jacalata wants to merge 2 commits into
gh-pagesfrom
jac/docs-excel-example-user-domain

Conversation

@jacalata

Copy link
Copy Markdown
Contributor

This PR corrects the `views.populate_excel` example and the docs for `UserItem.domain_name` and the user import methods.

  • `views.populate_excel`: `excel` is a generator of `bytes` chunks, so the example writes `b''.join(view_item.excel)`. Writing the generator object directly raises `TypeError`.
  • `UserItem.domain_name`: the row says what the value means on Tableau Server (the Active Directory domain, or `local`) and on Tableau Cloud (the authentication type). It also says that the property is read-only, so a `UserItem` you create has no domain; include the domain in `name` instead.
  • `users.bulk_add`: the example puts the domain in `name` (`example.com\user1`) instead of setting `domain_name`.
  • `users.bulk_remove`: the parameter row says each `UserItem` should have `name` and `domain_name` set, as items from `users.get` or `users.filter` do.
  • `users.create_from_file`: the whole `Username` value becomes `name`, and `domain_name` is not set, so a domain belongs in the username.

Refs #1128, #1100

Verification: Excel export checked against Tableau Cloud (REST API 3.30) and Tableau Server (REST API 3.31); the output starts with `PK`. `users.get` and `users.get_by_id` populate `domain_name` on Server; checked on 3.31 only.

🤖 Generated with Claude Code

jacalata and others added 2 commits November 9, 2026 22:35
view_item.excel is a generator, so join its chunks before writing. domain_name
is read-only and its meaning differs between Tableau Server and Tableau Cloud;
the bulk_add example now uses the domain-qualified name instead of setting it.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant