cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

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?

1 ACCEPTED SOLUTION

Accepted Solutions

szymon_dybczak
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

3 REPLIES 3

szymon_dybczak
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

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

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

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group