Snowflake date and time dimension

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

Uli Bethke

Uli has been rocking the data world since 2001. As the CEO of Sonra, the data liberation company, he’s on a mission to set data free. A self-proclaimed data evangelist, Uli doesn’t just talk the talk—he writes the books, leads the communities, and takes the stage as a conference speaker. Uli is a co-founder of DAMA Ireland, helping build a thriving community of data enthusiasts, and a proud Snowflake Data Superhero, leading the charge as the chapter lead of the Snowflake User Group Ireland. Whether sharing insights, empowering others, or championing the coolest data tools, Uli makes data fun. Growing up in Germany and making Ireland his home, Uli brings a global perspective to everything he does. On the academic side, he holds degrees in political science from Freie Universität Berlin, Albert Ludwigs Universität Freiburg, and the University of Ulster, Coleraine, adding a unique interdisciplinary flair to his work.

LinkedIn