Type 2 Add service to ConnectionItem properties For Oracle

Open
#1,807 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
62/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
api, databases

Research direction

Start with the ConnectionItem objects returned through datasource.connections and compare their Oracle connection attributes with the behavior described in issue 1571. Done means the Oracle service value is available on the connection and allows databases sharing the same server address and port to be distinguished.

Written by the indexing model from the issue text.

Description

Server-Side Enhancement ui-exists

Summary

Please include the Oracle Service Name in the ConnectionItems Attributes, similar to the functionality provided under: https://github.com/tableau/server-client-python/issues/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.

Dominant language
Python
Stars
716
Forks
446
Avg merge
8d 8h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tableau/server-client-python

All issues in tableau/server-client-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.