Tableau ERROR: current transaction is aborted, commands ignored until end of transaction block

Tableau ERROR: current transaction is aborted, commands ignored until end of transaction block

When trying to connect to postgres DB we get this error. Cause – Check drivers

https://www.tableau.com/support/drivers

Data source – postgre SQL

https://help.tableau.com/current/pro/desktop/en-us/examples_postgresql.htm

Schedule tableau pdf reports using powershell, tabcmd and windows task scheduler

Though using Tableau UI we can schedule pdf email but it doesn’t give us the flexibility in setting up page layout, scaling, sending email outside of tableau users, etc.,

I used below script to achieve this

Assumptions:
Tableau url: tableau.abc.com
Tableau workbook url: tableau.abc.com /#/site/sitename1/views/DashboardName_1/ViewName_1
Tableau logon user name: user_1 , password: Password_1
Email address to use for sending email: user_1@abc.com
Email recipients: user_2@abc.com; user_3@abc.com
Tableau tabcmd installed path: E:\Tableau\Command Line Utility\tabcmd.exe
Power shell installation path: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Power shell script path: E:\Tableau\Command Line Utility\ps_tableau_script.ps1
Pdf output location: E:\TableaurRportOutput\DashboardPdf_1
Below is the power shell script.
Smtp server: smtpxy.abc.gov

Before writing power shell script make sure you are able to send email using command prompt.
You can schedule power script using windows scheduler.
Powershell script: save below code as .ps1 format.

try
{

$file = “E:\TableaurRportOutput\DashboardPdf_1″+ “_” + $(get-date -f yyyy-MM-dd) + “.pdf”

#login to tableau and export pdf to a location.
./tabcmd.exe login -s https:// tableau.abc.com -t sitename1-u user_1 -p Password_1 $ –no-prompt
#-h –no-prompt
#–timeout 5
./tabcmd export ” DashboardName_1/ViewName_1″ –fullpdf –pagelayout landscape –pagesize letter -f $file –no-prompt
./tabcmd logout

#sending email
$FromEmail = “user_1@abc.com”
[string[]]$ToEmail = @(“user_2@abc.com”,”user_3@abc.com”)
$smtpserver = ” smtpxy.abc.gov ”

$Subject=”PDF Dashboard Report”
$message=”
Good morning,
`n
Please see attached the Dashboard daily report.

send-mailmessage -from (“$FromEmail”) -to ($ToEmail) -subject “$Subject” -Attachment $file -body “$message ” -BodyAsHtml -smtpServer $smtpserver

}

#failure email
catch [Exception]
{
Write-Host (“Errorcount $errorcount”)
Write-Host (“Error: {0}” -f $_.Exception.Message)
$errorcount = $errorcount + 1
$message = $_.Exception.Message
if ( $errorcount -eq 1)
{
send-mailmessage -from (“$FromEmail”) -to ($FromEmail) -subject “$Subject failed” -body “$message” -smtpServer $smtpserver
}
Start-Sleep -s 600
}

 

Tableau how to get more then 16 columns

I tried following approach and it worked.
rename .twb file to .xml
(if your tableau file is twbx then rename this file to .zip . get .twb file from this zip file. )
Open in notepad

search for following text:

change ’16’ to your desired value.
Now rename the .xml back to .twb. Open in tableau.

Though you could add more columns in tableau by changing xml, UI doesn’t look good. As tableau doesn’t support scroll bar on “Rows”

source:
https://community.tableau.com/thread/238456

Tableau tabcmd *** Uncaught exception RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.securi ty.provider.certpath.SunCertPathBuilderException: unable to find valid certifica tion path to requested target

Tableau tabcmd error
tabcmd login -s https://tableauserver.com -t site1 -u username –p password

*** Uncaught exception RuntimeException: javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed: sun.securi
ty.provider.certpath.SunCertPathBuilderException: unable to find valid certifica
tion path to requested target

When you get this error there are 2 ways of solving:
Solution1: Add tableau weburl to your trusted url’s in IE.
Solution2:
add –no-certcheck
tabcmd login -s https://tableauserver.com -t site1 -u username –p password –no-certcheck
and append –no-certcheck to export commands as well.

How to get SQL from Tableau

Follow below steps:

select Help → Settings and Performance → Start Performance Recordingfrom the Tableau toolbar.

Then right click on the source in the Data toolbar and select ‘Refresh’. This will force Tableau to re-run the query.

Once the query completes, select Help → Settings and Performance → Stop Performance Recording from the Tableau toolbar.

This should result in a new Tableau window opening with a workbook called ‘Tableau — PerformanceRecording’

Right-click anywhere in the bar next to ‘Executing Query’ and select ‘View data’

Source of the article:
Below URL gives a very good idea about this
https://blog.openbridge.com/7-steps-to-export-sql-statements-from-tableau-7e51a2fd4277