Monday, June 12, 2017

Java Scripting fun with Tableau


Here is one of the JavaScript I am listing below which will pop-up and will allow you to download the .CSV file of the dashboard you are viewing.
This feature doesn't exists till now in Tableau. However, the same functionality is existing in Qlikview and most of the time people will be looking for this feature.

End users get confused where to click to download the .CSV file of the view.
you can achieve this task by two ways

1. You can Add an image onto the dashboard, float it and add a URL to it that is the URL for the dashboard with .csv on the end.
 sample:  http://tableau.boa.com/views/Nammi_Workbook/Dashboard.csv

2. You can execute this javascript, which will allow end users to view the .CSV file of dashboard.
This actually pops-up and allows to downloads the worksheet.

function downloadToExcel() {
var popupWindow = window.open('http://tableau.boa.com/views/WorkbookNameOnServer/DashboardNammi.csv','','height=100, width = 425, location=no');
popupWindow.document.title = 'Once the Excel file has been downloaded, close this window.';
if (window.focus) {newwindow.focus()
return false;
}
}

On the HTML side, you can added a 'button' to a list that called the downloadToExcel() function.

Hope this helps.



What's the infomraiton we can get from VizQL Logs

It helps in Monitoring end-user experiences and troubleshooting specific issues with Tableau views and queries.

Questions that can be answered by VizQL logs include:

• How long it takes for your workbooks to load

• How many people are looking at a particular view

• How long queries are taking to load

• If your view is hitting the cache 

                          
Tableau’s VizQL logs store events related to user interactions with Tableau Views and executed queries. VizQL logs can be found at:

%ProgramFiles%\Tableau\Tableau Server\data\tabsvc\vizqlserver\Logs

VizQL logs are structured in JSON format, making them easy to search and visualize using a log management solution.

Following are the keys found in a standard VizQL log:

“ts”: the timestamp for this record “sess”: the session id
“pid”: the process id for this record “site”: the site name for this record
“tid”: the thread id for this record “user”: the user name
“sev”: the severity “k”: the type (“key”) of the record 
“req”: the http request id  


Handling and Troubleshoot Tabeau License.

Before you reach out to the vendor you can try all the possible troubleshooting steps for addressing the licenses. To know the exact error code OR to identify the error you can use the Utility called
tabinstallck.exe  Fortunately this utility exists in bin folder on primary server.

NOTE :You can also use tabadmin to perform these licensing tasks, but in order to do this Tableau Server must already be deployed and configured, so tabinstallck.exe provides a way to script the licensing step for a new Tableau Server installation that is not completely configured.

Using scripting languages or manual operations via the Command Prompt, you can activate online, refresh, and deactivate your license keys. To use tabinstallck.exe, you need to run the commands or script as an administrator on the primary Tableau Server node.

Activate start/wait tabinstallck.exe -activate <product_key>
Refresh /wait tabinstallck.exe -refresh <product_key>
Deactivate start/wait tabinstallck.exe -return <product_key>

@echo off
start/wait tabinstallck.exe -activate <product_key>
if %errorlevel% EQU 0 (ECHO SUCCESS) ELSE (ECHO FAILED)

Error Handling:

After you run the script error logs are stored under file tabinstallck.log . This can be under programdata folder which is hidden most of the time else you can search with the file name.

If activation was successful, the exit code is 0 (zero). The table below lists exit codes from the activation process and what they mean.

Exit Code
Message Value
536871012 TABLEAU_ERROR_LICENSING_GENERAL An unknown error occurred during the licensing operation.
536871013 TABLEAU_ERROR_LICENSING_INTERNAL The product is unable to start due to an internal licensing error.


Saturday, June 3, 2017

An Easter EGG in tableau - DebugMenu

Debugging menu is which officially doesn't in version 10. However, this unsupported version is a great tool for tableau developers for troubleshooting the scenarios. Thus we have to name it as an Easter egg of tableau. Let us break it.

Debugging in Tableau Desktop
Tableau Desktop includes a built-in debugger that you can use to test many things like version changed workbooks, Memory test, your connectors and many more features. Use the built-in debugger when you encounter differences that you cannot debug in the simulator.

Points to be Noted:
  • The version runs only on Professional license. Doesn't work with student key.
  • The built-in debugger only runs on Windows.
  • It is provided as-is and without official support by Tableau.
  • The debugger communicates with Tableau Desktop synchronously and therefore might appear unresponsive at times.
  • Work with Tableau Public .
  • Provides more options when you open the workbook.
To run the built-in debugger, complete the following steps:
  1. Open a command prompt.
  2. Navigate to the Tableau Desktop directory.
    cd "C:\Program Files\Tableau\Tableau <version>\bin\"
    
  3. Run Tableau Desktop with the debugging flag:
    tableau.exe -DDebugmenu  
  4. You can add it in shortcut as displayed above.
              

Thursday, June 1, 2017

Save your Work as .twbx.

Its preferred to save file in .twbx so that, its zips the file along with some data. and when shared with other help them to open hassle free. And the same time you should be aware of security measures whom to send the twbx file and twb file.

After you have created all the desired views of your data, you should save the results in a Tableau Workbook. Saving a Tableau workbook allows you to save all your worksheets for later use. It also allows you to share your results using a convenient file. Follow the steps below to save your workbook.
  1. Select File > Save or press Ctrl + S on your keyboard.
  2. Browse to a file location to save the workbook.
    By default, Tableau saves workbooks in the Workbooks directory in your Tableau Repository.
  3. Specify a file name for the workbook.
  4. Specify a file type. You can select from the following options:
    Tableau Workbook (.twb) – Saves the all the sheets and their connection information in a workbook file. The data is not included.
    Tableau Packaged Workbook (.twbx) – Saves all the sheets, their connection information and any local resources (e.g., local file data sources, background images, custom geocoding, etc.).
  5. When finished, click Save.

Java Scripting fun with Tableau

Here is one of the JavaScript I am listing below which will pop-up and will allow you to download the .CSV file of the dashboard you are v...