KNOWLEDGE BASE

Flow does not add the output result to database table and truncates database table when it runs in Tableau Server


Published: 25 Nov 2021
Last Modified Date: 25 Nov 2021

Issue

  • Flow does not add the output result to database table and truncates database table when it runs in Tableau Server
  • Output is executed as full refresh + replace data
  • There is no error when flow is executed. The job completes without error
  • Connecting to Amazon Redshift works. New workbook can be created in web authoring. The connection from flow also works when flow is edited in web authoring.
  • The issue does not happen in Tableau Prep Builder.

Environment

  • Tableau Server 2021.2.0
  • Linux
  • Amazon Redshift

Resolution

1. Check the logs and verify the driver used is Amazon Redshift ODBC Driver.
2. If driver is not Amazon Redshift ODBC, verify the driver is installed and configured:
a. To check if the driver is installed, confirm the following three files that are required for configuring the Amazon Redshift ODBC driver exist:
  • /opt/amazon/redshiftodbc/lib/64/amazon.redshiftodbc.ini
  • /opt/amazon/redshiftodbc/Setup/odbc.ini  (Sample > as per Amazon Redshift documentation for configuration this file can be copied to the user's home directory /home/$USER or ~/.)
  • /opt/amazon/redshiftodbc/Setup/odbcinst.ini (Sample > as per Amazon Redshift documentation for configuration this file can be copied to the user's home directory /home/$USER or ~/.)
b. After installation /opt/amazon/redshiftodbc/lib/64/amazon.redshiftodbc.ini should display Amazon Redshift information.
c. In /opt/amazon/redshiftodbc/Setup/odbcinst.ini the following information is displayed:

[Amazon Redshift (x64)]
Description=Amazon Redshift ODBC Driver(64-bit)
Driver=/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so


d. Copy above content to /etc/odbcinst.ini file. If this file does not exists, it can be created. 





 

Cause

Amazon Redshift driver has not been installed or configured. 

Additional Information

This is a sample of logs in Tableau Server when the table is truncated after running flow. The log shows the driver is not Amazon Redhsift:

protocol-logsession    -    Class: redshift, Driver Name: psqlodbcw.so, Driver ODBC Name: PostgreSQL Unicode, Driver ODBC Version: 03.51, Driver Version: 09.06.0500, ODBC Driver Manager Version: 03.52, Protocol: ODBCProtocol, Server Version: 1.0.32946


This is a sample of log in Tableau Prep Builder with correct driver and successful result that shows Amazon Redshift ODBC Driver is used:

protocol-logsession    -    Class: redshift, Driver Name: Amazon Redshift ODBC Driver, Driver ODBC Name: Amazon Redshift (x64), Driver ODBC Version: 03.80, Driver Version: 1.4.10.1000, ODBC Driver Manager Version: 03.80.0000, Protocol: ODBCProtocol, Server Version: 8.0.2

Tableau Driver Download
Install the Amazon Redshift ODBC driver on Linux
Use an ODBC driver manager to configure the driver on Linux and macOS X operating systems
 
Did this article resolve the issue?