Open nborua opened 7 years ago
Is there any solution for this? If I am moving live connection tds files TabMigrate does not work?
Is there a solution to this yet?
Tableau data sources don't get downloaded with user credentials embedded into them for security reason. Hence you'll have to embed the credentials before you import site contents by creating an xml file to hold database credentials. The file is included in the _SampleFiles directory with the name CredentialExample.xml. It has the following structure:
`
` You need to specify the path to this file in the available field on form when using 'upload from file system into site' option. Hope this helps.
Hi
If you are using Tab migrate project to publish workbook automatically via c# code , pass the credentials in FinalizePublish method. Code snippet will be as follows.
private SiteWorkbook FinalizePublish( string uploadSessionId, string publishedContentName, string publishedContentType, string projectId, CredentialManager.Credential dbCredentials) { var sb = new StringBuilder();
//Build the XML part of the MIME message we will post up to server
var xmlSettings = new XmlWriterSettings();
xmlSettings.OmitXmlDeclaration = true;
var xmlWriter = XmlWriter.Create(sb, xmlSettings);
xmlWriter.WriteStartElement("tsRequest");
xmlWriter.WriteStartElement("workbook");
xmlWriter.WriteAttributeString("name", publishedContentName);
xmlWriter.WriteAttributeString("showTabs", "true");
//If we have an associated database credential, write it out
if (dbCredentials != null)
{
CredentialXmlHelper.WriteCredential(
xmlWriter,
dbCredentials);
}
xmlWriter.WriteStartElement("project"); //<project>
xmlWriter.WriteAttributeString("id", projectId);
xmlWriter.WriteEndElement(); //</project>
xmlWriter.WriteEndElement(); // </workbook>
//Currently not supporting <connectionCredentials>
xmlWriter.WriteEndElement(); // </tsRequest>
xmlWriter.Close();
//_daoengagement.SaveServiceLog("Optix Insights Payload : "+sb.ToString(),"",0);
var xmlText = sb.ToString(); //Get the XML text out
//Generate the MIME message and pack the XML into it
var mimeGenerator = new MimeWriterXml(xmlText);
//Create a web request to POST the MIME message to server to finalize the publish
var urlFinalizeUpload = _onlineUrls.Url_FinalizeWorkbookPublish(_onlineSession, uploadSessionId, publishedContentType);
//NOTE: The publish finalization step can take several minutes, because server needs to unpack the uploaded ZIP and file it away.
// For this reason, we pass in a long timeout
var webRequest = this.CreateAndSendMimeLoggedInRequest(urlFinalizeUpload, "POST", mimeGenerator, TableauServerWebClient.DefaultLongRequestTimeOutMs);
var response = GetWebReponseLogErrors(webRequest, "finalize workbook publish");
using (response)
{
var xmlDoc = GetWebResponseAsXml(response);
//Get all the workbook nodes
var nsManager = XmlHelper.CreateTableauXmlNamespaceManager("iwsOnline");
var workbookXml = xmlDoc.SelectSingleNode("//iwsOnline:workbook", nsManager);
try
{
return new SiteWorkbook(workbookXml);
}
catch (Exception parseXml)
{
StatusLog.AddError("Workbook upload, error parsing XML resposne " + parseXml.Message + "\r\n" + workbookXml.InnerXml);
return null;
}
}
}
Hi, i tried to update _SampleFiles directory with the name CredentialExample.xml but it does not work. Is there any step I missed? What is the contentProjectName? The sample file i found it in folder TabMigrate-1.13\TabRESTMigrate_SampleFiles
I am using Tableau 10.5.2 and i have subproject. so my structure is as below. Main Project ---> Project 1 --->Data Sources
Can anyone help me on this?
Hi,
I am using TabMigrate v1.13 with Tableau 10.2. When I export my Site, the Live Connections do not get exported with the User ID and Password. I have checked and my Data Sources have Authentication as 'Embedded in Connection'. I also found that the DS xml that gets created, does not have these details. As a result, when I am Uploading from file system to site, these Data Sources are uploaded without the connection details and hence the Views/Workbooks using these DS do not get uploaded. Please let us know what is the solution for this. Thanks