Snowflake date and time dimension

Uli Bethke

Uli has been rocking the data world since 2001. As the Co-founder of Sonra, the data liberation company, he’s on a mission to set data free. Uli doesn’t just talk the talk—he writes the books, leads the communities, and takes the stage as a conference speaker.

Any questions or comments for Uli? Connect with him on LinkedIn.


Published on January 28, 2019
Updated on November 20, 2024

Here is a simple SQL script that will generate a date dimension in Snowflake. We are using the built-in GENERATOR and SEQ function. Start date for the dimension is 2017-01-01.

If you need a little extra and want to include a global holiday calendar in your date dimension you will be glad to hear that we have made a Date Dimension with Global Holiday Calendar dataset available on the marketplace https://www.snowflake.com/datasets/sonra-date-dimension-with-global-holiday-calendar/. If you want to find out more about our dataset go to our blog post where we explain it in more depth https://sonra.io/snowflake/date-dimension-with-global-holiday-calendar/

Uli Bethke

About the author:

Uli Bethke

Co-founder of Sonra

Uli has been rocking the data world since 2001. As the Co-founder of Sonra, the data liberation company, he’s on a mission to set data free. Uli doesn’t just talk the talk—he writes the books, leads the communities, and takes the stage as a conference speaker.

Any questions or comments for Uli? Connect with him on LinkedIn.