# dbt column data\_type for Snowflake object/variant/semi-structured data

**URL:** <https://discourse.getdbt.com/t/dbt-column-data-type-for-snowflake-object-variant-semi-structured-data/19128>\
**Category:** Help\
**Tags:** snowflake, dbt-core\
**Created:** [April 23, 2025, 3:22pm UTC](https://discourse.getdbt.com/t/dbt-column-data-type-for-snowflake-object-variant-semi-structured-data/19128 "2025-04-23T15:22:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joaogilsa](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@joaogilsa](https://discourse.getdbt.com/u/joaogilsa)\
**Post date:** [April 23, 2025, 3:22pm UTC](https://discourse.getdbt.com/t/dbt-column-data-type-for-snowflake-object-variant-semi-structured-data/19128/1 "2025-04-23T15:22:02Z")

</div>

Hi all,

Using dbt core, I’m currently trying to build models in which some columns are Snowflake should be objects/variants. However, when using “data\_type: variant” and enforcing the contract, an error occurs and the model is not built. When the contract is not enforced, the model is built correctly. Is there any recommended data\_type or approach for this kind of columns? I’ve tried to find a reference for the accepted data\_type options in Snowflake, but I have failed to find it so far.

#### Some example code or error messages

schema.yml code

```auto
models:
- name: model_x
  config:
       materialized: table
       contract:
           enforce: true
       columns:
         - name: column_a
           data_type: variant
         - name: column_a.key_a
           data_type: variant

```

#### Error message upon executing dbt build

```auto
Database Error in model model_x (models\model_x\model_x.sql)
  001003 (42000): SQL compilation error:
  syntax error line 111 at position 29 unexpected '.'.
  syntax error line 113 at position 8 unexpected '('.

```

**Note** : non-exhaustive, as the rest of the error is a repetition of the syntax error lines mentioning unexpected ‘(’)
