Conversation
…r-specific attrs The REST API's <connection> element only surfaces generic fields (id, type, serverAddress, serverPort, userName, embedPassword, authenticationType, queryTaggingEnabled). Connector-specific attributes -- Oracle service, Snowflake schema, Teradata query-band, initial SQL, etc. -- live inside the workbook or datasource file itself. This sample downloads the file via TSC and parses it with the community `tableaudocumentapi` library to reach the extra attributes. Verified against a live Tableau Cloud site: on a SQL Server datasource, the sample returns dbname/schema values that are None on the REST ConnectionItem. Addresses the recurring backlog around connector-specific connection metadata (#1807, #1571, #569, #353, #160) by pointing users at the existing download-and-parse path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The sample documents Python 3.7, but the repository requires Python 3.10 or later.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds a sample that downloads Tableau workbooks or datasources and reads connector-specific connection attributes using Tableau Document API.
Changes:
- Adds workbook and datasource inspection helpers.
- Prints database, schema, service, query-band, and initial SQL attributes.
- Adds CLI authentication and download handling.
File summaries
| File | Description |
|---|---|
samples/inspect_connection_details.py |
New connection-detail inspection sample. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Fold the inline sign-in argparse block into the shared helper landed in #1843. Users of this sample now get env / .env / interactive-prompt credential resolution, JWT + username/password auth in addition to PAT, and a clear ValueError when --server is missing under non-TTY, instead of an opaque 400/401 inside TSC. Also update the header's Python-version claim from 3.7 to 3.10 to match `pyproject.toml`'s `requires-python = ">=3.10"`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The documented dependency name is incorrect, so installation fails before the sample can run.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 3
- Review effort level: Lite
| # with the community `tableaudocumentapi` library to reach the extra attributes. | ||
| # | ||
| # Requires: | ||
| # pip install tableauserverclient tableau-document-api |
| from tableaudocumentapi import Datasource, Workbook | ||
| except ImportError: | ||
| raise SystemExit( | ||
| "This sample requires the tableau-document-api package.\n" "Install it with: pip install tableau-document-api" |
Comment on lines
+58
to
+59
| # Every attribute below comes from the raw XML embedded in the file; none of | ||
| # these are exposed by TSC's ConnectionItem today. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relevant to #1807, #1571, #569, #353, #160.
Motivation
The REST API's
<connection>element surfaces only generic fields (id, type, serverAddress, serverPort, userName, embedPassword, authenticationType, queryTaggingEnabled). Connector-specific attributes — Oracle service, Snowflake schema, Teradata query-band, initial SQL, etc. — live inside the workbook or datasource file itself and aren't reachable viaConnectionItem.Behavior
Adds
samples/inspect_connection_details.py. Downloads the workbook or datasource via TSC, parses it with the communitytableaudocumentapilibrary, and prints the connector-specific attributes that don't appear on the REST connection.Test plan
Verified against a live Tableau Cloud site: on a SQL Server datasource, the sample returns
dbname/schemavalues that areNoneon the RESTConnectionItem.