Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

The 'How to Guide' to Publishing to Tableau

JordanB
Alteryx
Alteryx
Created

The ‘How to Guide’ for the Publish to Tableau Server Tool

 

This article is for version 1.0.9 or older of the tool. For steps to configure version 2.0+, please see this help document.

 

The partnership between Alteryx and Tableau is becoming stronger and stronger, and the seamless effortless integration has been made easier through the Publish to Tableau Server Tool.

 

You can download the tool from the Alteryx Analytics Gallery. Once you have downloaded the tool you should be able to find it in the Connectors tool category. 

 

pttsToolbar.png

 

Now once you have downloaded the Macro you are ready to configure the tool and Publish to Tableau.

 

 

Environment

 

  • Alteryx Designer
  • Publish to Tableau Server tool 
    • Version <= 1.0.9

 

Step 1: Access

 

You have to have access to an instance of Tableau Server ( 9.0.1 and above) or Tableau Online to use this tool and publish a data stream to tableau. Unless noted otherwise, Tableau Server and Tableau Online are interchangeable throughout this document and throughout the tool's configuration. For the sake of brevity, “Tableau Server” will refer to both Tableau Server and Tableau Online for the remainder of this document.

 

Step 2: Configure the Connection

 

This macro gives you the choice to either connect directly to Tableau Server through the web browser or through the server URL.

 

‘Connect with full page URL’

When you log into Tableau Server navigate to the workbook page you are looking to write to. This is the recommended option. You can then copy the whole URL into the text box given in the interface.

 

Example URL:

https://10ay.online.tableau.com/#/site/mycompanyssite/workbooks

 

‘Connect with server and site’

With this option selected, you must enter in the domain name for the Server URL (eg, https://10ay.online.tableau.com using the example above).

 

Tableau Server is designed so that multiple "sites" can be hosted on the same server instance. Use the guidance below to determine your site name when you log in to Tableau Server from a web browser.

 

With Tableau Server, immediately after entering in a user name and password, one of two things will happen:

 

1) The user is prompted to select a site. If this happens, the site selected here can be entered into the “Enter site name” field

2) The user is logged directly into Tableau Server, without having to select a site. If this is the case, then the user should select the “Use default site” option.

 

With Tableau Online there is no default site and you will always need to manually enter the site name with this option (one of the reasons “Connect with full page URL” is the preferred method, especially when connecting to Tableau Online). Once you log in, the URL should be something like: https://10ay.online.tableau.com/#/site/mycompanyssite/workbooks. The site name will be the string contained between the slashes following "#/site/". In this example, the site name would be mycompanyssite.

 

Once you have chosen your connection you can choose to ‘save connection history’ which will keep your credentials and connection within the ‘select existing connection’ radio button. This will populate a dropdown with all your previous successful connections.

 

 

Step 3: Enter your username and password

 

At this stage please enter your username and password for Tableau Server, the same as when logging in through a web browser.

 

 *Please see common errors if you are receiving an ‘Error 400000 Bad Request message’

 

 

Step 4: Let's move to the Output tab

 

By default the ‘Publish data source’ will be selected. At this stage you will need to type in the newly created data source on Tableau Server. The data source name is case sensitive and needs to be accurate.

 

You can either manually type in the project name or choose ‘select project name’ which will only populate if you have ‘Refresh project name list…’ ticked and have run the module once. If the ‘Refresh project name list’ option is checked, no data will be published to Tableau Server – this is simply a setup step to get the list of available projects put into the dropdown!

 

Pic 3.png

 

 

Step 5: Output Options

 

Once you have the correct data source and project name you can choose your output method. “Create data source” will generate a new file in the specified project folder, however if a file already exists with the same data source name, the file will not be uploaded and will give an error.

 

The second option is “overwrite data source”. The file will be uploaded regardless of whether the file exists or not in the specified project folder. If a file with the same name already exists, it will be overwritten.

 

Pic 4.png

 

Step 6: Optional

 

If you choose to select the “request authentication token” option the macro will provide an authentication token in the X-Tableau-Auth field. This can be used to make subsequent calls to the Tableau Server REST API with the Download tool or other tools such as curl. The data source will not be published.

 

 

Tips and Tricks

 

Make sure the tool is up-to-date!

 

Visit the Publish to Tableau Server tool’s Gallery page by going to gallery.alteryx.com and navigating to the Macro District, or by going directly to this link.

 

 

PTTS Version.png

 

 

Then, check the version of the tool by right-clicking on it, and clicking “Open Macro: Publish To Tableau Server.yxmc”. Then, in the workflow configuration window, click on the Meta Info tab.

 

 pttsversioncheck.png

 

 

[Note: v1.02 and earlier do not show the tool version, in which case you should update to the newest one by downloading it from its page on the Gallery!]

 

Do your homework!

Log into the Tableau Server or online and retrieve the connection URL name! You only need the URL up to the workbook you are writing out too.

 

Check the small print!

If you choose the ‘select project name’ make sure you tick the ‘refresh project name list’ and run the module once to populate the drop down. (And again, when the tool is run with this option checked, no data will be published.)

 

Refreshing’ the data source

Using the new Publish to Tableau Server tool, even if you are successful, it will not “refresh” the data source automatically. This means you’d have to do it from the Tableau side. Within Tableau you can set up interval refreshing which will refresh on the Tableau side periodically. However, you can also refresh manually as well.

 

 Pic 5.png

 

 

 

Common Errors

 

Payload is either malformed XML or incomplete

 

Pic 6.png

 

This is a limitation in the Tableau Server API, that we’ve communicated to Tableau, but are awaiting a response/fix so it’s a bit outside our control. If your password contains any characters that require xml-escaping double/single quotes, greater than, less than, ampersand, or percent sign – “ ‘ < > & %) – then the login request will fail. This is especially true if your password has two special characters in it. The latest Publish to Tableau Tool has been built to handle the majority of these special characters however if you continue to experience this error message, the current workaround is to change your password to avoid special characters or include just one of the above characters.  

 

 

Tool #200 Iteration limit of 1000 was reached

 

Pic 7.png

 

This error has been resolved in the latest version of the tool. Please download it here. 

 

Tableau Data Engine Error: 4: SimpleDatabase::SelectMetadataName: expected found=1, actual found=0 (fk= name="Extract" nameTable="TEST") The table "[Extract].[Extract]" does not exist. Unable to connect to the file "C\Desktop….". Check that the file exists and that you have sufficient access privileges for it.

 

This error has been resolved in the latest version of the tool. Please download it here.  

 

If you continue to have problems with the Publish to Tableau Tool please contact Support.

 

 

Best,

 

Jordan Barker

Client Services Support Engineer

Comments
BPurcell2
9 - Comet

Any creative solutions to managing expiring passwords?

 

I have several workflows that run off Alteryx Server, then publish to Tableau server -- these are virtually maintenance free, until my password expires -- every 60 days, I believe.

ShawnM
Alteryx Alumni (Retired)
mahadevaswab
8 - Asteroid

Can we use Tableau work book or extract as Input file and then the same can be used for publish into Tableau?

 - Mahadeva Swamy

cmcclellan
13 - Pulsar

No, Alteryx cannot read hyper files, only write to them.

dineshp
8 - Asteroid

Hi, i am getting the below error messages when i try to upload files to tableau server. Any work around?

 

Alteryx Version: 10.7

Tableau Server Version: 2018.3

Publish to Tableau Server Tool Version: 1.04

 

Error: Publish to Tableau Server (1): Tool #592: Record #1: Tool #19: Tool #4: Tableau Server API Request (Initialize file upload) Error Code 401002: Unauthorized Access -- Invalid authentication credentials were provided.

 

Error: Publish to Tableau Server (1): Tool #592: Record #1: Tool #34: Iteration #1: Tool #11: Error transferring data: URL using bad/illegal format or missing URL

 

123.png

IJReed
8 - Asteroid

Hi @dineshp , 

 

Not sure if this is the error, but I was running into issues with having special characters in my Tableau Online account. Try removing special characters from your password. Its a long shot but worth a try!

 

Good luck!

dineshp
8 - Asteroid

Hi @IJReed ,

 

This is for tableau server, i have used special characters in past works and published without any issue. I don't think it's due to my password special characters.

sopauljauck
6 - Meteoroid

Have you confirmed that you have the correct Publish To Tableau Server version?  I believe there is a much newer version for it.  I believe you have to download the newest version.

 

Alteryx Version: 10.7

Tableau Server Version: 2018.3

Publish to Tableau Server Tool Version: 1.04

Watsa
8 - Asteroid

It happened to me before. Once I updated the tool to the new version (at that time) and everything has been working. Here is my current application info. 

 

Alteryx: 2018.3

Tableau server: 2018.3

Publish to Tableau Server Tool: 1.08.1

Able to overwrite and append the data.

sopauljauck
6 - Meteoroid

You can download the latest version from here:  https://gallery.alteryx.com/#!app/Publish-to-Tableau-Server-Tool/599c93c8f499c7141c13a619

 

Release notes:

v2.0.0 - Attach a .tds file for data source metadata. Requires Alteryx version 2018.2 and Tableau Server 10.5 or newer.

v1.09.2 - Support for Tableau Hyper. Fixed path issue. Field validation update. Requires Alteryx version 2018.1 and Tableau Server 10.5 or newer.

v1.08.1 - Compatible with Alteryx version 10.5-11.8 and Tableau Server 9.01-10.3.

 

 

We're in the process of upgrading our 10.5 to 2018.3 as well. 

dineshp
8 - Asteroid

 

@sopauljauck  @Watsa  Issue resolved after i upgraded to 1.08.1. Thanks :)

 

danielbrun2
ACE Emeritus
ACE Emeritus
I have seen this error before and experienced that it often has something
to do with special characters in the password. Could that be the case? If
so I would try another password and see if that works.

Best regards,
--
*Daniel Brun-Elgaard *
*+45 21 25 61 20 <+45+21+25+61+20>*
Gammel Kongevej 3E
1610 København V

Inviso.dk
afreseman
7 - Meteor

I've been having a problem recently with this tool.  The way the tool is currently written, the macro will call the Tableau API to request a token as soon as the flow is started (basically because that part of the macro is not dependent on input).  

 

Normally this would be fine, but I happen to have a flow that runs for 4+ hours before getting to the actual publish macro.  What this means it that when the flow gets to the step to publish, the token provided has expired (default is 4 hours).  One solution would be to increase the wgserver.session.idle_limit setting in the Tableau config file, but I can't convince my IT department to do that.

 

I've tried putting a block tool in front of the publish, but it will still run that initial part of the macro (because of no dependency on data).  Is there some way that I'm missing or does the macro need to change somehow to make the initial auth wait until it gets to the tool itself?

dineshp
8 - Asteroid

@afreseman If you are connecting at the end of output, the macro will not initialize. Unless your having it as a separate input to something. Can you post a screenshot or give a sample workflow.    

afreseman
7 - Meteor

@dineshp 

Notice the 3% progress just after the workflow started.Notice the 3% progress just after the workflow started.

 

If you go look at the "Publish to Tableau" macro, you'll notice that the "Step 0" part which logs you in and gets a token, is not dependant on the macro input.  From the research I've done, this means that that part will execute before the stream gets to that tool.

JillH
5 - Atom

Hi all, 

 

I am experiencing a problem inconsistently.  I am using the Publish to Tableau tool to update the primary data source for a visualization.  Sometimes I get the error below, sometimes I do not, so I know the user name, password, etc are correct.  This issue started within the last month. I want this workflow on the Alteryx Server to schedule the workflow so that my visual is automatically updating, it is using an API to pull information from a project management website.  

 

Capture.PNG

 

Versions

Tableau: Tableau 2018.1 

Alteryx: Alteryx Designer 2018.3 x64

Tool: PublishToTableauServer_v2.0.0.yxi

 

Does anyone know of a solution?

Thank you!

MajorBhatti
6 - Meteoroid

Thank you Jordan!

 

I tried and its work for me. The only challenge I see is my data is published as Live - is there any way I can publish data as extract?

 

Appreciate your help!

 

Regards,

Major Singh Bhatti

jdrummey
9 - Comet

Hi @MajorBhatti, what you're seeing is an idiosyncrasy of Tableau:  The data source *is* published as an extract, the "live" part is that Tableau has a "live" connection to the extract.

 

Jonathan

 

Alex_Bibin
5 - Atom

Hi, is there any plans to upgrade the tool to support multitable .hyper extracts ?

cstouwie
7 - Meteor

Can you give a guide to how to successfully publish to server with a .tds with metadata included?

I've been having trouble doing this successfully and from my websearching i'm piecing together a bunch of different posts on it.

 

(I have Tableau Server ver 2019.1.5 / Tableau 2019.1 / Alteryx 2019.1.6 / Publish to TS 2019.1)

 

Thanks!

AndrewW
11 - Bolide

@jonathandrummey& @The_Dev_Kev_Env , losing the published data source structure has been an issue for a very long time. Tabcmd is the simple answer. Call tabcmd using Run Command and publishing to Tableau Server becomes simple. The criticial piece is using a --replace parameter in tabcmd.

 

The full write up is here: https://tarsolutions.co.uk/blog/publish-tableau-server-alteryx-using-run-command/. The article is almost 5 years old but, last time I checked, was still valid.

NicolasSz
11 - Bolide

Hi all,

 

An easy alternative to implement here would be use to token authentification. https://help.tableau.com/v2019.4/server/en-us/security_personal_access_tokens.htm 

 

In that case, it is a super easy change to make in the macro at authentification level. Essentially, only the body of the initial request would have to be changed compare to username and password : https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_auth.htm#make-a-sign-in-r...

 

Can you please implement that changes to strengthen this tool ? 

 

I've put my idea also here : https://community.alteryx.com/t5/Alteryx-Designer-Ideas/Publish-to-Tableau-Server-without-username-a... 

 

Thanks a lot,