tableau / TabMigrate

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

Uploading Workbooks with Live Connections failing #31

Open sdasgupta-18 opened 6 years ago

sdasgupta-18 commented 6 years ago

I exported some workbooks and data sources which have Live connections to HANA databases. When I try to "upload" these workbooks & data sources to a target server, I get the below errors:

"....Possibly the workbook contains live database connections that need credentials so that thumbnail images can get generated....."

Does this mean, we cannot upload workbooks with Live connections to data sources?

rferraton commented 6 years ago

No, you have to include an xml file with credentials for each data sources. sample content of the xml file: `

`

Then when you launch the siteimport command add the switch -dbCredentialsFile dbcredmapping.xml

sdasgupta-18 commented 6 years ago

Thanks! So we are saying, if there are 100 workbooks then we have to include tags 100 times in the xml file, right? Where do I need to select the xml file in the interface for "Upload option"?

rferraton commented 6 years ago

If you have embeded datasources yes, but if you have "shared" datasources, only for each "shared" datasources.

The xml file is defined here : image

sdasgupta-18 commented 6 years ago

Hi, I have a workbook that connects to a SQL server database using a user-id and password. I created the XML file (WBs.xml) as below & kept it in c drive.

image

During the upload I specified the path of this xml file. See the screen shot below:

image

I still get the same error. Am I missing anything? Please help

rferraton commented 6 years ago

Try to remove "projects" from the target url

sdasgupta-18 commented 6 years ago

Hi, I removed the "projects" from the target URL, but i still get the same error.

rferraton commented 6 years ago

Tableau Version ?

sdasgupta-18 commented 6 years ago

It's 10.5.0

piyum24 commented 6 years ago

Any update/resolution for this? I also wasn't able to get the .XML file to work either for .TWB files with Live connections or .TWBX files with no embedded data source credentials.

gbeaver commented 5 years ago

@rferraton @sdasgupta-18 , Has there been any resolution to the reported issue? I have a similar issue I would love to fix!

Live Connection from .twb

Tableau version 10.5.3

piyum24 commented 5 years ago

Gbeaver, I wasn't able to resolve the issue (it wasn't worth investing more time in). For .TWB files, I recommend you have the owners embed the authentication credentials and/or switch them to extracts, so you're dealing with .TWBX files. Not a great answer, but it worked for us.

gbeaver commented 5 years ago

Thanks @piyum24 unfortuantely that is not an option for me :(

I'm hoping the others may have some insight!

rferraton commented 5 years ago

Did you try with my fork for tableau 10.5 ? https://github.com/aetperf/TabMigrate/tree/10.5-dev/TabRESTMigrate/bin/Release

gbeaver commented 5 years ago

Thank @rferraton, After your recommendation I did try that, and I got the same response.

I am able to make this work in TabCMD, but I can't seem to get it with the REST API/TabMigrate.

Are you able to make a demo with superstore? Because I can't even get that to work.

The last comment would be that we do not use SSO. We have dedicated db credentials as provided in your sample file.

XML:

<xml>
<credential contentType="workbook" contentProjectName="{{NAME WITH SPACES}}" contentName="TESTING workbook.twb" dbUser="{{USERNAME}}" dbPassword="{{PASSWORD}}" credentialIsEmbedded="false"> </credential>
</xml>
piyum24 commented 5 years ago

@rferraton, is Tabmigrate v10.5 branch compatible with updated Tableau versions (e.g. 2018.3)? If not, are there any plans for updating Tabmigrate from this v10.5 to v2018.3?

Appreciate the help maintaining this open-source tool.

rferraton commented 5 years ago

@rferraton, is Tabmigrate v10.5 branch compatible with updated Tableau versions (e.g. 2018.3)? If not, are there any plans for updating Tabmigrate from this v10.5 to v2018.3?

Appreciate the help maintaining this open-source tool.

new branch for 2018.3 with a release : https://github.com/aetperf/TabMigrate/blob/2018.3-dev/TabRESTMigrate/bin/Release/TabRESTMigrate.exe

piyum24 commented 5 years ago

Thanks @rferraton! I'll test it out.

srikanth999 commented 5 years ago

Thanks @rferraton. I ran this and notice an error while generating the .twb

Error generating Twb file: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\XXXXX\Tableau\Tabmigrate_SampleFiles\SiteInventory.twb'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy) at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver) at System.Threading.CompressedStack.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state) at System.Xml.XmlTextReaderImpl.OpenUrl() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at System.Xml.XmlDocument.Load(String filename) at TwbReplaceCSVReference.Execute() at TaskMaster.Execute_GenerateSiteInventoryFile_Twb(String pathReportCsv)