Appearance
dim.date
The dim.date
is a standard date dimension present in most data warehouses. It allows you to analyze the trends and patterns in your data over a specific timeframe. While computing values with different functions, it's typically better to maintain a precalculated calender.
Column Name | Data Type | Description | Example |
---|---|---|---|
date_sk | DATE | The actual date. One row for every day from the year 2020 till year 2069. | 09-12-2069 |
date_start | DATE | The start of the day to join tables. | 09-12-2069 |
date_end | DATE | The end of the day to join tables | 10-12-2069 |
time_start | TIME | The time at which the day begins. | 00:00:00 |
time_end | TIME | The time at which the day ends. | 23:59:59 |
year | INT | Year of the date. | 2069 |
month | INT | Month of the date. | 12 |
day | INT | Day of the date. | 9 |
dow | INT | Day of week, with Sunday being day 1. | 2 |
week | INT | The US week number. | 50 |
iso_dow | INT | Day of week, with Monday being day 1. | 1 |
iso_week | INT | The ISO weekday (Starting monday). | 50 |
dow_name | VARCHAR(50) | The name of the day of week. | Monday |
yyyymm | VARCHAR(7) | Date in the format “YYYY-MM”. | 2069-12 |
yyyymmdd | VARCHAR(10) | Date in the format “YYYY-MM-DD”. | 09-12-2069 |
is_weekend | BOOLEAN | Is this day a weekend? | False |
ISO-8601 (International Organization for Standardization) calendars have a consistent number of weeks in each quarter and a consistent number of days each week. The purpose of the ISO-8601 calendar is to provide a consistent and clear method to represent and calculate dates. ISO-8601 calendars divide dates into years, quarters, weeks, and weekdays. The standard provides a well-defined, unambiguous method of representing calendar dates and times in worldwide communications, especially to avoid misinterpreting numeric dates and times when such data is transferred between countries with different conventions for writing numeric dates and times.