Category Archives: Tableau Server

Tabcmd Part 2

Last year I wrote about Tableau Server’s tabcmd feature here. Well just this week, I’ve been working on a solution that leverages tabcmd. The problem is that we need a PDF copy of one dashboard with more than 5000 options on one filter. Our company has over 5000 franchise hotels in the US, so one per property. Luckily, this can be achieved rather painlessly with tabcmd.

The best way to handle this would be to create a batch file that contains all the commands. This is as easy as launching a text editor and saving the file with a .bat extension. Start by login into your server.

tabcmd login -s http://localhost -t site -u username -p p@ssw0rd!

The -t site is optional. It allows a users to log into a specific site within the tableau server installation. If you’re sharing this code and don’t want your password sent around (good InfoSec practice), you can create just a text file with your password and refer to that file with –password-file pwd.txt.

Next is the meat of the script, all 5000+ iterations. Tableau Server allows for filters to be passed into the URL. I used the export tabcmd to generate a PDF and save to a location.

tabcmd export “workbook/view?Filter=val” –pdf –pagelayout landscape -f “C:\filename.pdf”

There are some options that can be included in the export command, like landscape. Be sure to check the documentation for other possibilities. I used Excel to quickly create each line of the tabcmd, changing the Filter value.

The last thing to remember is to log out of the server. So close the batch file with tabcmd logout. Simply double click the .bat file that was created and your script will start. Thanks for reading and please let me know what you’ve been able to do with tabcmd.

Share Button

Tableau server tip – Email Action

A quick and easy way to provide your user base the ability to email any questions about a given dashboard is to use a URL action. If you’re unfamiliar with actions, definitely check out this Knowledge Base article.

First, I decided to use an image of a question mark as a flag for the user. After a quick google image search, I found the one below that I liked. Download the image and save it to your …\My Tableau Repository\Shapes folder. I created a “Custom” sub-folder in this path to keep my custom shapes together.

ScreenHunter_01 Mar. 31 14.38

In your workbook, create a new sheet. The data source used is unimportant as you’re just going to create a viz with this shape in it.

Change the Marks to Shape, click the Shape pill, click More Shapes and choose the Custom folder (or what ever you named it) from the Select Shape Palette drop down. Click your shape and click OK.

ScreenHunter_02 May. 19 16.19

Now drop the omnipresent Number of Records measure into the Shape pill. You should now have a sheet that looks like this:

ScreenHunter_03 May. 19 16.23

You can enlarge the view by dragging along the sides of the sheet. Use the Size pill to make the shape larger or smaller as desired. I also format the sheet to remove Row and Column Dividers. In the Tooltip, replace existing text with something like “If you have questions about this data, please email:”.

Place this sheet anywhere in your dashboard. I prefer mine at the upper corner, right of the dashboard title.

ScreenHunter_04 May. 19 16.30

Create a URL Action. Name it your desired receiving email address. In the URL section, type: “mailto: email_address”

ScreenHunter_06 May. 19 16.36

Now when a user hovers over the image, the Tooltip will appear with the text and hyperlink. In my organization we use MS Outlook. Clicking the link launches a new email which contains your receiving email address already populated.

ScreenHunter_07 May. 19 16.40

Pretty simple trick. Hope you enjoyed it.


Share Button

You’re Welcome

This past week I was at a happy hour for a departing co-worker. While there I started talking to someone who I recently pointed her to a server viz for data. In our Post Production facility, we have an application called ScheduALL. It is a resource management system used by many media companies. The system has reporting capabilities via Crystal Reports. Our users generally provide volume/cost reports of network activity to others who do not have access to ScheduALL. Last year I had setup a variety of server vizzes for anyone to view network spend in our facility based on their network assignment. Our application runs on SQL Server and we have setup nightly jobs to create FACT tables of transaction data.

So back to the happy hour. The lady I was speaking this week had asked for assistance on how to generate these reports out of the system. This is a task where users run the data, export to Excel and create a pivot table of the results. The problem is our network reps are asked for this constantly. I instead sent her a link to a server viz that already contained the results and filters for more precise output. She now uses the tableau server viz instead of generating her own report. She also forwarded the link to her customer who was requesting the data.

I am not exaggerating when in her effusive Thank You to me, she said this new method of providing data to clients was “life changing.” Both her and her client were truly grateful for what I had provided with the power of Tableau Server. I love seeing newcomers to our world just be utterly wow’d.

So to her and everyone else who has thanked me for doing something I love, you’re welcome!

Share Button

Tableau Server Tip

Tip time again. And this one focuses on Tableau Server. One of my favorite features of Tableau Server is the ability to publish data sources. I work for a global company and we constantly share data with teams in international offices. This data can range from SQL Server/Oracle data to Excel files stored on a multitude of share drives. Publishing data sources allows our global teams to all access data needed for a given project or report, without needing access to where the underlying data is stored. This has been advantage and allowed collaboration between regions, all while working with a single version of the truth.

Ok, now getting to the tip. Let’s say you’re given a workbook that already contains charts, tables, dashboards, and of course, calculated fields. The workbook is connected to a published data source on your server. You try to edit a calculated field and the only option is Edit Copy, which makes a new calculated field.

ScreenHunter_02 Jul. 24 16.45

This is not ideal because the calculated field you’d like to edit is already embedded in several locations of the workbook. So how do you edit the original field?

Easy, simply right click on the data source name and select Create Local Copy.

ScreenHunter_03 Jul. 24 16.48

Save the data source to your desired folder. You’ll now have a new data source.

ScreenHunter_04 Jul. 24 16.50

Next, swap data sources so the exists workbook sources from the local copy.

Select Data > Replace Data Source…

ScreenHunter_01 Jul. 24 19.59

Now when you right click to edit a calculated field, you’ll be able to edit the original field that is already being used throughout the workbook.

ScreenHunter_05 Jul. 24 16.51

From here, you can proceed with the needed task. Just remember that if you republish the data source, your calculated field edits will be available for others. So depending on your ultimate goal, know if you should overwrite the original published data source or not.

Thanks! And happy Tableau’ing!

Share Button

Tableau Server Tip

As an administrator of Tableau Server, you’re granted access to six dashboards that show a variety of server activity/performance/utilization information. These dashboards are connected to Tableau’s internal PostgreSQL database. What if you’d like other server users to access these admin dashboards but you do not want to grant those users Administrative rights? There are four easy steps to accomplish this.

  1. Create a PostgreSQL password
  2. Find and copy the tabbed_admin_views workbook
  3. Open workbook and update database connections with your server and password
  4. Publish workbook

Step 1:

  • Log onto your machine that runs Tableau Server and in Command Line navigate to the bin folder
  • Type tabadmin db pass [password] (in version 9, “dbpass” is one word)
  • For [password] input your desired password
  • Type tabadmin configure
  • Type tabadmin restart

You’ve now set a password to the internal PostgreSQL database. You’re free to connect to it from a new workbook and poke around. Note, if you have not done so, you’ll need to install PostgreSQL database drivers.

Step 2:

Thank you Adolph Barclift, DC-VA Tableau User Group Co-Chair for the assistance on this step. 

While logged in to your machine running Tableau Server, open folder …Tableau\Tableau Server\[version]\wgserver\z5\WEB-INF\admin

Make a copy of the tabbed_admin_views.twb and save to desired location.

ScreenHunter_01 Feb. 08 12.44

Step 3:

Open the workbook and click OK when prompted to log in, you’ll get an error and click Yes to edit the connection.

Complete the connection dialog with your credentials. Port, Database and Username should remain unchanged.

ScreenHunter_02 Feb. 08 13.03

This workbook has eight separate connections so you’ll have to repeat the process seven more times.

Step 4:

Publish workbook, embedding credentials, and set your security as desire.

Congratulations! You now have your own administrative dashboards. What’s even better is that you can create custom admin dashboards! Check out Russell Christopher’s series on Tableau History Tables for more details on PostgreSQL schema.

Share Button