Entity dim_product
Stereotype: dimension
Subject areas: Sales Star
Attributes
| # | Name | Type | Null | Default | Key | Terms | Description |
|---|---|---|---|---|---|---|---|
| 1 | product_key | integer | no | PK | |||
| 2 | sku | text(40) | no | UQ | |||
| 3 | name | text(200) | no | ||||
| 4 | category | text(100) | yes | ||||
| 5 | brand | text(100) | yes |
Keys
| Kind | Name | Attributes |
|---|---|---|
| primary | pk_dim_product | product_key |
| unique | uq_dim_product_sku | sku |
Relationships
| Name | Role | Other entity | Cardinality | Attributes | Identifying | On delete | On update |
|---|---|---|---|---|---|---|---|
| fact_sales_product | parent | fact_sales | one to many | fact_sales.product_key -> dim_product.product_key | no | no_action | no_action |
Physical
bq (bigquery): public.dim_product
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | product_key | int64 | no | product_key | ||||
| 2 | sku | string(40) | no | sku | ||||
| 3 | name | string(200) | no | name | ||||
| 4 | category | string(100) | yes | category | ||||
| 5 | brand | string(100) | yes | brand |
- primary key pk_dim_product (product_key)
- unique uq_dim_product_sku (sku)
dbx (databricks): default.dim_product
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | product_key | int | no | always | product_key | |||
| 2 | sku | string | no | sku | ||||
| 3 | name | string | no | name | ||||
| 4 | category | string | yes | category | ||||
| 5 | brand | string | yes | brand |
- primary key pk_dim_product (product_key)
- unique uq_dim_product_sku (sku)
mysql (mysql): warehouse.dim_product
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | product_key | int | no | by_default | product_key | |||
| 2 | sku | varchar(40) | no | sku | ||||
| 3 | name | varchar(200) | no | name | ||||
| 4 | category | varchar(100) | yes | category | ||||
| 5 | brand | varchar(100) | yes | brand |
- primary key pk_dim_product (product_key)
- unique uq_dim_product_sku (sku)
pg (postgresql): dw.dim_product
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | product_key | integer | no | always | product_key | |||
| 2 | sku | varchar(40) | no | sku | ||||
| 3 | name | varchar(200) | no | name | ||||
| 4 | category | varchar(100) | yes | category | ||||
| 5 | brand | varchar(100) | yes | brand |
- primary key pk_dim_product (product_key)
- unique uq_dim_product_sku (sku)
rs (redshift): public.dim_product
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | product_key | integer | no | always | product_key | |||
| 2 | sku | varchar(40) | no | sku | ||||
| 3 | name | varchar(200) | no | name | ||||
| 4 | category | varchar(100) | yes | category | ||||
| 5 | brand | varchar(100) | yes | brand |
- primary key pk_dim_product (product_key)
- unique uq_dim_product_sku (sku)
snow (snowflake): public.dim_product
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | product_key | number(10, 0) | no | always | product_key | |||
| 2 | sku | varchar(40) | no | sku | ||||
| 3 | name | varchar(200) | no | name | ||||
| 4 | category | varchar(100) | yes | category | ||||
| 5 | brand | varchar(100) | yes | brand |
- primary key pk_dim_product (product_key)
- unique uq_dim_product_sku (sku)