Skip to content

Type 2 Add service to ConnectionItem properties For Oracle #1807

Open

Description

@binnera

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

  1. jacalata commented on Jul 31, 2026

    @jacalata
    Contributor

    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 — currently id, type, authenticationType, dbClass, filename, googleSheetId, scope, useOAuthManagedKeychain, instanceUrl, oauthConfigId, embedPassword, password, serverAddress, serverPort, userName, queryTaggingEnabled, workgroupAuthMode, authFederationServiceAccount. There is no service, serviceName, dbName, or databaseName in what the server sends back on either GET /datasources/{id}/connections or GET /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.

  2. jacalata commented on Jul 31, 2026

    @jacalata
    Contributor

    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() or workbooks.download(), you can:

    import tableauserverclient as TSC
    from tableaudocumentapi import Datasource
    
    server.datasources.download(ds_id, filepath="ds.tdsx", include_extract=False)
    ds = Datasource.from_file("ds.tdsx")
    for c in ds.connections:
        print(c.dbclass, c.server, c.dbname, c.service, c.schema, c.query_band, c.initial_sql)

    That covers the connector-specific fields today. The REST API <connection> schema is a stripped subset of what's in the file itself.

  3. jacalata commented on Jul 31, 2026

    @jacalata
    Contributor

    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 DatabaseServer type exposes hostName, port, connectionType, and service — the last one being exactly the Oracle service name field this issue asks about.

  4. added
    ui-existsFunctionality is available in the Tableau UI but not yet in the REST API
    on Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Server-Side Enhancementui-existsFunctionality is available in the Tableau UI but not yet in the REST API

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions