tableau / document-api-python

Create and modify Tableau workbook and datasource files
https://tableau.github.io/document-api-python/
MIT License
326 stars 178 forks source link

Cannot get field attributes #247

Open Trones21 opened 1 year ago

Trones21 commented 1 year ago

I have a tdsx of a published datasource (which is live to a virtual connection (which is extracts only) to AWS Athena).

I am attempting to use Datasource.Fields attributes but can't because instead of a full Field object I only get a string which is the id.

This will print the id: ds = Datasource.from_file('myDS.tdsx') for f in newDS.fields: print(f)

This throws an error: ds = Datasource.from_file('myDS.tdsx') for f in newDS.fields: print(f.name) AttributeError: 'str' object has no attribute 'name' The same error occurs with all attributes (but of course the attribute changes to whatever I specify)