KNOWLEDGE BASE

String Fields In Database Having More Than 255 Characters Are Truncated When Connecting To Hortonworks Hadoop Hive In Tableau Desktop


Published: 22 Apr 2022
Last Modified Date: 25 Apr 2022

Issue

When connecting to Hortonworks Hadoop Hive in Tableau Desktop, if the string fields has more than 255 characters, they will be truncated to 255 characters. 

Environment

  • Tableau Desktop 2019.1 or higher
  • Hortonworks Hadoop Hive

Resolution

1. Use TDC file to increase the String Column Length:

<?xml version='1.0' encoding='utf-8' ?>
<connection-customization class='hortonworkshadoophive' enabled='true' version='10.5'>
<vendor name='hortonworkshadoophive'/>
<driver name='hortonworkshadoophive'/>
<customizations>
            <customization name='odbc-connect-string-extras' value='DEFAULTSTRINGCOLUMNLENGTH=999' />
</customizations>
</connection-customization>

You may further change the string length if 999 is not enough for your column's length:

2. If using "Other Database (ODBC)" connector to connect to Hortonworks Hadoop Hive, you may change the default value from the ODBC DSN.
Open the DSN with ODBC Data Source Administrator (64-bit). Click on "Advanced Option" and set "Default string column length" to 999 or higher.
 

Cause

The truncation of the 'string' field to 255 characters is caused by a default String Column Length within Hortonworks Hadoop Hive ODBC driver.
Did this article resolve the issue?