Support for Varchar data type

phanindra
New Contributor III

In the official documentation for supported data types, Varchar is not listed. But in the product, we are allowed to create a field of varchar data type. We are building an integration with Databricks and we are confused if we should support operations like data fetch from a varchar data type field. Can someone confirm if Databricks has deprecated or is deprecating varchar data type?

szymon_dybczak
Esteemed Contributor III

Hi @phanindra ,

To be precise, Delta Lake format is based on parquet files. For strings, Parquet only has one data type: StringType

So, basically varchar(n) data type under the hood is represented as string with check constraint on the length of the string.

VARCHAR and CHAR in Databricks and Delta Lake | by Kyle Hale | Medium

View solution in original post

Thanks for the swift response Slash! Can I assume that Databricks will continue support for Varchar datatype in the foreseeable future?

szymon_dybczak
Esteemed Contributor III

Yep, because it's just regular string type with check constraint you can safely assume that it'll be supported.