divinorum-webb / tableau-api-lib

An API library that allows developers to call on the methods listed in Tableau's REST API documentation.
MIT License
96 stars 34 forks source link

Problems with get_datasources_dataframe @ Tableau API 3.16 #86

Closed dreamca4er closed 2 years ago

dreamca4er commented 2 years ago

Python version: 3.7.13 tableau-api-lib version: 0.1.40 Tableau API version: 3.16

Hello, looks like this problem and the one described in https://github.com/divinorum-webb/tableau-api-lib/issues/38 have similar roots: When executing get_datasources_dataframe we are getting 'Internal Server Error'. And the reason of this is that now conn.query_data_sources doesn't work with parameter_dict={'fields': 'fields=_all_'}. Changing fields value to 'fields=_default_' (or to an enumeration of fields) fixes this problem.

divinorum-webb commented 2 years ago

Hey @dreamca4er thanks for calling this out, all built-in usages of the _all_ fields parameter in this library are now removed. I suspect this is a bug in Tableau's REST API endpoints and have been trying to call attention to it for about a year now but so far it hasn't received much attention. I figure it's best to just assume that bug could impact any endpoint at some point in the future, so for the foreseeable future this library will simply use the _default_ parameters for all of the utils.querying functions such as get_datasources_dataframe.

Running pip install -U tableau-api-lib has your recommended fix in place, and I've verified that it is working as expected on API version 3.16.

dreamca4er commented 2 years ago

Thanks a lot!