bryanthowell-tableau / tableau_tools

Package containing Tableau REST API, XML modification, tabcmd and repository tools
Other
215 stars 86 forks source link

In TableauDatasource generate_relation_section is never called, so new TDS is never valid #20

Closed daVinciCEB closed 6 years ago

daVinciCEB commented 6 years ago

I'm using the latest version of the tableau_tools library to try and create new data sources from scratch.

I've been successful in creating a new file and adding a connection to my database, but the file is not valid without adding at least one relation to the TDS file. I saw in the code that you have a function set_first_table() which sets up the main relation, but while the main_table_relation object is set in the TableauDatasource object, it is never actually added to the data source xml.

bryanthowell-tableau commented 6 years ago

I'm digging deep into the data source creation code now. There was quite a bit off with it (this part just one aspect, and thank you very much for noticing it). I just pushed up v.4.3.15 which should at least restore the basic functionality of creating a data source from scratch. README section 2.10 has been updated to show the initial syntax that should work.