Repository navigation
Commit 6f171fa
feat(samples): sample for reading connector-specific connection attrs (#1880)
* feat(samples): add inspect_connection_details.py for reading connector-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>
* Adopt _shared.py credential helper in inspect_connection_details
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>
* Fix inspect connection sample review comments
Co-authored-by: bcantoni <58372+bcantoni@users.noreply.github.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Brian Cantoni <bcantoni@salesforce.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: bcantoni <58372+bcantoni@users.noreply.github.com>1 parent 7bb9852 commit 6f171fa
1 file changed
Lines changed: 108 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
0 commit comments