skip to main content
Connection Option Descriptions for Apache Spark SQL : Varchar Threshold
  

Try DataDirect Drivers Now

Varchar Threshold

Attribute

VarcharThreshold (VT)

Purpose

Specifies the threshold at which the driver describes columns of the data type VARCHAR as LONGVARCHAR. If the size of the VARCHAR column exceeds the value specified, the driver will describe the column as LONGVARCHAR when calling SQLDescribeCol and SQLColumns. This option allows you to fetch columns that would otherwise exceed the upper limit of the VARCHAR type for some third-party applications, such as SQL Server Linked Server.

Valid Values

x
where:
x
is the maximum size in characters of columns the driver will describe as VARCHAR.

Notes

*When returning result set metadata for Varchar columns, the Spark Thrift server reports the column type as (12) STRING and the precision as 2147483647. This issue can cause the settings of the following connection options to produce unexpected results: Max String Size, Min Long Varchar Size, String Describe Type, and Varchar Threshold. For the latest information about this issue, refer to the Apache JIRA SPARK-5918 issue Web page: https://issues.apache.org/jira/browse/SPARK-5918.
*Configuring the VarcharThreshold and MinLongVarcharSize options allows you to fetch VARCHAR and LONGVARCHAR columns with sizes that fall between the data-type ranges used by some applications, such as SQL Server Linked Server.

Default

None. If no value is specified, the driver will not change the described type for VARCHAR columns.

GUI Tab

Advanced tab

See also

Min Long Varchar Size