1

I need some sample DDL to create a snowflake table with primary keys and partition columns.

1 Answer 1

1

The documentation can sometimes be a little overwhelming, I get it, so here is an example.

CREATE OR REPLACE TABLE stack_overflow (
    post_id          INTEGER,
    post_str         VARCHAR(20),
    post_timestamp   TIMESTAMP_LTZ,
    PRIMARY KEY (post_id, post_str))
CLUSTER BY (to_date(post_timestamp));

https://docs.snowflake.com/en/sql-reference/sql/create-table.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.