# Column Descriptions and Constraints in Snowflake via DBT

**URL:** <https://discourse.getdbt.com/t/column-descriptions-and-constraints-in-snowflake-via-dbt/16461>\
**Category:** Help\
**Tags:** snowflake, dbt-core\
**Created:** [October 7, 2024, 5:22am UTC](https://discourse.getdbt.com/t/column-descriptions-and-constraints-in-snowflake-via-dbt/16461 "2024-10-07T05:22:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![karthikpotturi](https://avatars.discourse-cdn.com/v4/letter/k/6bbea6/32.png) [@karthikpotturi](https://discourse.getdbt.com/u/karthikpotturi)\
**Post date:** [October 7, 2024, 5:22am UTC](https://discourse.getdbt.com/t/column-descriptions-and-constraints-in-snowflake-via-dbt/16461/1 "2024-10-07T05:22:04Z")

</div>

## The problem I’m having

I use dbt to deploy my models into snowflake. The materialization is set to view. Once they are deployed, I run tasks to create static tables out of them and they are scheduled to run periodically. I want to have the column descriptions for each column in my model and I am usign the .yml file to have the descriptions. I also want to have the constraints like not null, primary key for some columns in my model. I was looking into [constraints | dbt Developer Hub](https://docs.getdbt.com/reference/resource-properties/constraints#defining-constraints) documentation and tried to apply the same to one of my model. I am aware the this only works for views as stated in the document. Hence, I changed the materialization to table and mentioned the constraints on few columns. But when checked at snowflake, I can see the column descriptions but not the constraints. Even not null too.

## The context of why I’m trying to do this

## What I’ve already tried

## Some example code or error messages

```auto

version: 2

models:
  - name: cust_details
    description: Customer details table
    columns:
      - name: cust_id
        data_type: varchar
        description: customer account id
        constraints:
          - type: not_null
          - type: primary_key
        tests:
          - unique
      - name: cust_name
        description: Customer name
      - name: cust_phone
        description: Customer Phone

```

Expectation is to have the primary key and not null enabled in snowflake, but it is not the case. Pleae advise. Thanks in advance.
