---
title: Variant type support for Apache Iceberg and Delta Lake
description: The VARIANT data type on Databricks allows Delta Lake tables to store semi-structured data alongside structured columns. Apache Iceberg v3 tables include VARIANT support by default.
canonical_url: https://docs.databricks.com/aws/en/tables/features/variant
---

# Variant type support for Apache Iceberg and Delta Lake

The `VARIANT` data type stores semi-structured data. For examples on working with `VARIANT`, see [Query variant data](https://docs.databricks.com/aws/en/semi-structured/variant.md).

All Apache Iceberg v3 tables include `VARIANT` type support. See [Use Apache Iceberg v3 features](https://docs.databricks.com/aws/en/iceberg/iceberg-v3.md). For Delta Lake tables, you must explicitly enable `VARIANT` type support.

You must use Databricks Runtime 15.4 LTS or above to read and write tables with variant support enabled.

## <a id="enable-variant" />Enable variant on a table

To enable variant, create a new table with a `VARIANT` type column:

```sql
CREATE TABLE table_name (variant_column VARIANT)
```

To enable support for `VARIANT` on an existing table, use the following syntax:

```sql
ALTER TABLE table_name SET TBLPROPERTIES('delta.feature.variantType' = 'supported')
```

> [!NOTE]
>
> Enabling variant upgrades the table writer protocol. This might affect compatibility with external Delta Lake clients. See [Delta Lake feature compatibility and protocols](https://docs.databricks.com/aws/en/tables/features/feature-compatibility.md).

## <a id="limitations" />Limitations

Support for the `VARIANT` data type has the following limitations:

* You can't use variant columns to partition a table.
* A variant column can't be a clustering key for a table.
* You can't use variant columns with `GROUP BY` or `ORDER BY` clauses.
* You can't call `DISTINCT` on a variant column.
* You can't use SQL set operators (`INTERSECT`, `UNION`, `EXCEPT`) with variant columns.
* You can't use column generation to create a variant column.
* Variant columns don't support `minValues` or `maxValues` statistics.
* A variant column can't contain a value larger than 128 MiB (16 MiB in Databricks Runtime 17.1 and below).
