-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
populate_connections
doesn't fetch datasource_id
#1536
Comments
Yes, that's a bug. We can populate the id from the datasource information we already have, I can add that. |
Hello @jacalata, thanks for your reply. That sounds great! Regarding the If I'm not mistaken, there are only two factory methods that directly process the XML response from the API:
It seems that the API doesn't return this information. Would it be okay to add a setter method like this to the @property.setter
def datasource_id(self, datasource_id) -> None:
self._datasource_id = datasource_id |
@LuigiCerone what are you expecting that datasource_id to be? The id of the datasource on which you called |
Hello @jorwoods
This |
@LuigiCerone can you help me understand what this enables beyond using the id or datasource object you already have? @jacalata I propose we remove the datasource_id and name from the connection item entirely. Theoretically a breaking change but since it's never been populated, usage should be basically non-existent. My thinking is:
|
The issue regarding the missing datasource value within the collection came up because I was trying to update the hyper data via the API using the method: job = server.datasources.(
ds.connections[0],
request_id=request_id,
actions=actions,
payload=payload
) Inside server-client-python/tableauserverclient/server/endpoint/datasources_endpoint.py Lines 330 to 333 in 1d98fda
which fails with the aformentioned problem. |
Closes tableau#1536 Populates the datasource id and name on the `ConnectionItem`s as they return.
Closes tableau#1536 Populates the datasource id and name on the `ConnectionItem`s as they return.
Based on the legitimate and internal usage of the |
Closes #1536 Populates the datasource id and name on the `ConnectionItem`s as they return. Co-authored-by: Jordan Woods <[email protected]>
Describe the bug
Hi,
I'm encountering an issue with the Tableau Python client. Specifically, the
datasource_id
is missing from theConnectionItem
object.Here’s the scenario: after retrieving a datasource by id, I populate its connections, but the
ConnectionItem
objects lack the datasource information.From reviewing the source code:
server-client-python/tableauserverclient/server/endpoint/datasources_endpoint.py
Line 106 in 1d98fda
it seems the REST method being used by the module is:
GET /api/api-version/sites/site-id/datasources/datasource-id/connections
.According to the official documentation, this method does not appear to return datasource information.
Versions
To Reproduce
Results
connections[0].datasource_id
isNone
, data is not fetched from the REST API.Thanks :)
The text was updated successfully, but these errors were encountered: