EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB441546: Running a Report Results in the "String Data, Right Truncated" Error


Community Admin

• Strategy


This Knowledge Base article describes an issue that might appear when running a report using Apache Impala.

Description


When trying to run a report that contains an attribute fetched from Impala longer than 1024 characters the following error appears.
Status: Execution failed
Error: SQL Generation CompleteQueryEngine encountered error: Fetch.
Error type: Odbc success with info. Odbc operation attempted. SQLFetch. [01004:0: on HSTMT]. Error in Process method of Componenet: QueryEngineServer, Project  Interpolis - OnMarc Reporting Suite, Job 136068, Error Code=-2147212544.

ka0PW0000000tFpYAI_0EM44000000QdSX.png

  
You can also see the following entries in the

DSSErrors.log
file at corresponding timestamps:
[HOST:VM31][SERVER:CastorServer][PID:2220][THR:6884][Database Classes][Error] Fetch.
Error type: Odbc success with info. Odbc operation attempted: SQLFetch. [01004:0: on HSTMT] [Strategy][ODBC Impala Wire Protocol driver]String data, right truncated. Error in column [Column number].
Depending on the database you're using, your error message might vary a little, but the common part would be:
String data, right truncated.

Why is this happening?


Strategy provides a function that automatically adjusts varchar sizes for different databases to avoid negative performance instance that very large varchar variables could cause. In this function, if no maximum length for varchars is provided, it's hardcoded to

1024
 by default.

Solution

Workaround

  • Modify Registry to increase ODBCMaxLongVarSize value from default 1024 to a higher proper value.

For Windows, add a

DWORD(32-bit)
Value of
ODBCMaxLongVarSize
into Registry path
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MicroStrategy\DSS Suite
and set its value to be large enough to fit the requirements, for example 
10000.

ka0PW0000000tFpYAI_0EM4W0000027BYj.png
ka0PW0000000tFpYAI_0EM4W0000027BYk.png

For Linux, add below line of example value 1000 into MSIReg.reg

[HKEY_LOCAL_MACHINE\SOFTWARE\MicroStrategy\DSS Suite]
under Strategy install path.
“ODBCMaxLongVarSize”=dword:0x00001000
Please treat the ODBCMaxLongVarSize value carefully since it may impact all the query performance. The value will be used to calculate data fetch times, if the value is too large may increase the interactive times which may result in performance degradation. Therefore, if decides to increase the ODBCMaxLongVarSize please set its value properly.

  • Since the ODBCMaxLongVarSize value takes into effect on all the connections, in order to minimize the impact down to gateway level, the VLDB Maximum Var Size is recommended.


Please check DATABASE.PDS file on Developer machine, find Impala DSSOBJECT section with correct version. For example Impala 3.x.




Add below line of example value 1000 under <PROPERTYSET NAME="VLDB Data Type">.


<PROPERTY NAME="Maximum Var Size" VALUE="1000" />



 

Then upgrade DB instance for Impala 3.x from Developer Administration->Configuration Managers->Database Instances > UpgradeSelect the modified DATABASE.PDS from the Developer machine and click Load. Then move Impala 3.x from left panel to the right panel replacing the existing version configuration. Click OK to save.The last step is, restart the I-server. 


Comment

0 comments

Details

Knowledge Article

Published:

August 20, 2018

Last Updated:

February 26, 2024