Background
The Strategy Hive ODBC Driver has a setting called 'Default String Column Length' that allows users to set the max size that a STRING data type is reported to the Strategy Intelligence Server. This setting is important as it instructs the Strategy Intelligence Server of the buffer size to allocate while fetching string columns from Hive. Since STRING columns can hold up to 2GB of data this has some implications:
- If the 'Default String Column Length' is set too large it can lead to performance issues as the Strategy Intelligence Server will need to allocate additional resources.
- If the 'Default String Column Length' is set too low it will lead to data truncation
Product defaults
Strategy sets the following defaults:
- For Data Import DSN-less connections this value is set to 4000. The value is configurable by editing the connection string (see Workaround section below).
- For DSN connections on Linux this value is set to a default value of 4000 and can be edited in the odbc.ini by changing the DefaultStringColumnLength setting (see Workaround section below).
- For DSN connections on Windows this value defaults to 255. This can be edited in the DSN via the ODBC Administrator (see Workaround section below).
Example of truncation message in Data Import using DSN-less connection:
Below is an example when the amount of data in the Hive STRING column exceeds the max value set in the DSN via the 'Default String Column Length' setting.
Workaround
Data Import:
To work around the truncation error in Data Import DSN-less follow the steps below:
- Navigate to your DSN-less connection to hive on Strategy Web and edit it
- Edit the value of Default String Column Length to a value based on your string column size.