Description
Summary
Please include the Oracle Service Name in the ConnectionItems Attributes, similar to the functionality provided under: #1571
Description
Issue 1571 seems to have added the attribute database_name to the ConnectionItems Class, however it returns with 'none' when the connection_type is oracle
The following code
for i, conn in enumerate(datasource.connections, start=1):
for attr in dir(conn):
if not attr.startswith("_"):
value = getattr(conn, attr)
if not callable(value):
print(f"{attr}: {value}")
returns
auth_type: RDBMS
connection_credentials: None
connection_type: oracle
database_name: None
datasource_id: 12345678-90ab-cde1-2345-1234567890ab
datasource_name: Weekly data source
embed_password: False
id: 22345678-00ab-dde1-3345-2234567890ab
password: None
query_tagging: None
server_address: oracle.db.server
server_port: 1521
username: dbuser
Ideally I'd like the attribute 'service' added or for database_name to be dynamically populated with the relevant connection string attribute.
Mirroring the requirement specified in the previous issue we would like to be able to differentiate between connections to different databases on the same server, that share the same listener port.
Activity
jacalata commentedon Jul 31, 2026
Thanks for the report. Looked into this and the underlying issue turns out not to be Oracle-specific.
The REST API's
<connection>response element has a fixed attribute set — currentlyid, type, authenticationType, dbClass, filename, googleSheetId, scope, useOAuthManagedKeychain, instanceUrl, oauthConfigId, embedPassword, password, serverAddress, serverPort, userName, queryTaggingEnabled, workgroupAuthMode, authFederationServiceAccount. There is noservice,serviceName,dbName, ordatabaseNamein what the server sends back on eitherGET /datasources/{id}/connectionsorGET /workbooks/{id}/connections, for any connection type. Verified by inspecting the API schema (v3.27–v3.30) and by round-tripping ~500 real connections across 10 connector types on Tableau Cloud — none of them carry those attributes. I will look into what should be added to this by the server. Tagging this as server-side work for now.jacalata commentedon Jul 31, 2026
Follow-up to the last comment — the easiest way to read connector-specific attributes (Oracle service, Snowflake schema, Teradata query-band, initial SQL, etc.) today is the tableau/document-api-python library. Combined with TSC's
datasources.download()orworkbooks.download(), you can:That covers the connector-specific fields today. The REST API
<connection>schema is a stripped subset of what's in the file itself.jacalata commentedon Jul 31, 2026
Update — for the audit / discovery use case (finding which connections point at which Oracle services, dbnames, etc.), the Tableau Metadata API is a better fit than either the REST API or downloading files. The GraphQL
DatabaseServertype exposeshostName,port,connectionType, andservice— the last one being exactly the Oracle service name field this issue asks about.feat(samples): sample for reading connector-specific connection attrs (…