tableau / TabMigrate

A lightweight tool for moving Tableau content between multiple Tableau Server environments
MIT License
118 stars 59 forks source link

Embedded credentials xml file being read but not acted upon, help ! #59

Open alitwaij opened 3 years ago

alitwaij commented 3 years ago

Hi there, I have been using TabMigrate to download and upload datasoruces and workbooks but unfortunately the xml file i created (and formatted in the way advised) doesnt seem to be being applied. The log file is saying 'Loading database credentials from C:\Temp\c.xml' and then operating normally to successfuly upload datasources, and there are no error reports of issues with password embedding. The only errors are about workbooks not being published successfully because server failed to connect to datasource (presumably becuase the password is not there, and remote server giving error 403 forbidden). I am using the version that works with server 2019.1 and 2019.2 (our source and trarget servers). Any ideas why this is not working?

Because of the embedding failure i am able to upload all datasources but only some of the workbooks. I have used the sample xml file provided as my guide and have scrutinzed it to make sure it matches. I wish there was a dtd we could use to verify conformoty.

Note that i am only using the exe version and not the c# code version. Am not very confident with csharp

kaisp84 commented 1 year ago

The request which is sent to the RESTA API for publishing the workbook had to be changed in my case. See request example for publishing a workbook with embeded credentials in REST API documentation: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_workbooks_and_views.htm#publish_workbook

<!-- Publishing a file in the request body: -->
<tsRequest>
  <workbook name="workbook-name" showTabs="show-tabs-flag" thumbnailsUserId="user-luid">
    <connections>
    <connection serverAddress="server-address" serverPort="port-number">
    <connectionCredentials name="connection-username" password="connection-password"
          embed="embed-flag" />
    </connection>
    </connections>
    <project id="project-id"/>
  </workbook>
</tsRequest>

The connectionCredentials element is now contained in a connection element which is a sub element of a connections element. tabmigrate's request had only the connectionCredentials element as a sub element of the workbook element