Entity dim_date
Calendar dimension, one row per day.
Stereotype: dimension
Subject areas: Sales Star
Attributes
| # | Name | Type | Null | Default | Key | Terms | Description |
|---|---|---|---|---|---|---|---|
| 1 | date_key | integer | no | PK | |||
| 2 | full_date | date | no | UQ | |||
| 3 | day_of_month | smallint | no | ||||
| 4 | day_of_week | smallint | no | ||||
| 5 | day_name | text(9) | no | ||||
| 6 | day_of_year | smallint | no | ||||
| 7 | week_of_year | smallint | no | ||||
| 8 | month_of_year | smallint | no | ||||
| 9 | month_name | text(9) | no | ||||
| 10 | quarter | smallint | no | ||||
| 11 | year | smallint | no | ||||
| 12 | is_weekend | boolean | no | ||||
| 13 | is_holiday | boolean | no | false | |||
| 14 | fiscal_year | smallint | no | ||||
| 15 | fiscal_quarter | smallint | no |
Keys
| Kind | Name | Attributes |
|---|---|---|
| primary | pk_dim_date | date_key |
| unique | uq_dim_date_full_date | full_date |
Relationships
| Name | Role | Other entity | Cardinality | Attributes | Identifying | On delete | On update |
|---|---|---|---|---|---|---|---|
| fact_sales_date | parent | fact_sales | one to many | fact_sales.date_key -> dim_date.date_key | no | no_action | no_action |
Physical
bq (bigquery): public.dim_date
Calendar dimension, one row per day.
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | date_key | int64 | no | date_key | ||||
| 2 | full_date | date | no | full_date | ||||
| 3 | day_of_month | int64 | no | day_of_month | ||||
| 4 | day_of_week | int64 | no | day_of_week | ||||
| 5 | day_name | string(9) | no | day_name | ||||
| 6 | day_of_year | int64 | no | day_of_year | ||||
| 7 | week_of_year | int64 | no | week_of_year | ||||
| 8 | month_of_year | int64 | no | month_of_year | ||||
| 9 | month_name | string(9) | no | month_name | ||||
| 10 | quarter | int64 | no | quarter | ||||
| 11 | year | int64 | no | year | ||||
| 12 | is_weekend | bool | no | is_weekend | ||||
| 13 | is_holiday | bool | no | false | is_holiday | |||
| 14 | fiscal_year | int64 | no | fiscal_year | ||||
| 15 | fiscal_quarter | int64 | no | fiscal_quarter |
- primary key pk_dim_date (date_key)
- unique uq_dim_date_full_date (full_date)
dbx (databricks): default.dim_date
Calendar dimension, one row per day.
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | date_key | int | no | always | date_key | |||
| 2 | full_date | date | no | full_date | ||||
| 3 | day_of_month | smallint | no | day_of_month | ||||
| 4 | day_of_week | smallint | no | day_of_week | ||||
| 5 | day_name | string | no | day_name | ||||
| 6 | day_of_year | smallint | no | day_of_year | ||||
| 7 | week_of_year | smallint | no | week_of_year | ||||
| 8 | month_of_year | smallint | no | month_of_year | ||||
| 9 | month_name | string | no | month_name | ||||
| 10 | quarter | smallint | no | quarter | ||||
| 11 | year | smallint | no | year | ||||
| 12 | is_weekend | boolean | no | is_weekend | ||||
| 13 | is_holiday | boolean | no | false | is_holiday | |||
| 14 | fiscal_year | smallint | no | fiscal_year | ||||
| 15 | fiscal_quarter | smallint | no | fiscal_quarter |
- primary key pk_dim_date (date_key)
- unique uq_dim_date_full_date (full_date)
mysql (mysql): warehouse.dim_date
Calendar dimension, one row per day.
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | date_key | int | no | date_key | ||||
| 2 | full_date | date | no | full_date | ||||
| 3 | day_of_month | smallint | no | day_of_month | ||||
| 4 | day_of_week | smallint | no | day_of_week | ||||
| 5 | day_name | varchar(9) | no | day_name | ||||
| 6 | day_of_year | smallint | no | day_of_year | ||||
| 7 | week_of_year | smallint | no | week_of_year | ||||
| 8 | month_of_year | smallint | no | month_of_year | ||||
| 9 | month_name | varchar(9) | no | month_name | ||||
| 10 | quarter | smallint | no | quarter | ||||
| 11 | year | smallint | no | year | ||||
| 12 | is_weekend | tinyint(1) | no | is_weekend | ||||
| 13 | is_holiday | tinyint(1) | no | false | is_holiday | |||
| 14 | fiscal_year | smallint | no | fiscal_year | ||||
| 15 | fiscal_quarter | smallint | no | fiscal_quarter |
- primary key pk_dim_date (date_key)
- unique uq_dim_date_full_date (full_date)
pg (postgresql): dw.dim_date
Calendar dimension, one row per day.
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | date_key | integer | no | date_key | ||||
| 2 | full_date | date | no | full_date | ||||
| 3 | day_of_month | smallint | no | day_of_month | ||||
| 4 | day_of_week | smallint | no | day_of_week | ||||
| 5 | day_name | varchar(9) | no | day_name | ||||
| 6 | day_of_year | smallint | no | day_of_year | ||||
| 7 | week_of_year | smallint | no | week_of_year | ||||
| 8 | month_of_year | smallint | no | month_of_year | ||||
| 9 | month_name | varchar(9) | no | month_name | ||||
| 10 | quarter | smallint | no | quarter | ||||
| 11 | year | smallint | no | year | ||||
| 12 | is_weekend | boolean | no | is_weekend | ||||
| 13 | is_holiday | boolean | no | false | is_holiday | |||
| 14 | fiscal_year | smallint | no | fiscal_year | ||||
| 15 | fiscal_quarter | smallint | no | fiscal_quarter |
- primary key pk_dim_date (date_key)
- unique uq_dim_date_full_date (full_date)
rs (redshift): public.dim_date
Calendar dimension, one row per day.
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | date_key | integer | no | always | date_key | |||
| 2 | full_date | date | no | full_date | ||||
| 3 | day_of_month | smallint | no | day_of_month | ||||
| 4 | day_of_week | smallint | no | day_of_week | ||||
| 5 | day_name | varchar(9) | no | day_name | ||||
| 6 | day_of_year | smallint | no | day_of_year | ||||
| 7 | week_of_year | smallint | no | week_of_year | ||||
| 8 | month_of_year | smallint | no | month_of_year | ||||
| 9 | month_name | varchar(9) | no | month_name | ||||
| 10 | quarter | smallint | no | quarter | ||||
| 11 | year | smallint | no | year | ||||
| 12 | is_weekend | boolean | no | is_weekend | ||||
| 13 | is_holiday | boolean | no | false | is_holiday | |||
| 14 | fiscal_year | smallint | no | fiscal_year | ||||
| 15 | fiscal_quarter | smallint | no | fiscal_quarter |
- primary key pk_dim_date (date_key)
- unique uq_dim_date_full_date (full_date)
snow (snowflake): public.dim_date
Calendar dimension, one row per day.
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | date_key | number(10, 0) | no | always | date_key | |||
| 2 | full_date | date | no | full_date | ||||
| 3 | day_of_month | number(5, 0) | no | day_of_month | ||||
| 4 | day_of_week | number(5, 0) | no | day_of_week | ||||
| 5 | day_name | varchar(9) | no | day_name | ||||
| 6 | day_of_year | number(5, 0) | no | day_of_year | ||||
| 7 | week_of_year | number(5, 0) | no | week_of_year | ||||
| 8 | month_of_year | number(5, 0) | no | month_of_year | ||||
| 9 | month_name | varchar(9) | no | month_name | ||||
| 10 | quarter | number(5, 0) | no | quarter | ||||
| 11 | year | number(5, 0) | no | year | ||||
| 12 | is_weekend | boolean | no | is_weekend | ||||
| 13 | is_holiday | boolean | no | false | is_holiday | |||
| 14 | fiscal_year | number(5, 0) | no | fiscal_year | ||||
| 15 | fiscal_quarter | number(5, 0) | no | fiscal_quarter |
- primary key pk_dim_date (date_key)
- unique uq_dim_date_full_date (full_date)