Entity dim_customer
Customer dimension (type 1).
Stereotype: dimension
Subject areas: Sales Star
Attributes
| # | Name | Type | Null | Default | Key | Terms | Description |
|---|---|---|---|---|---|---|---|
| 1 | customer_key | integer | no | PK | |||
| 2 | customer_id | text(40) | no | UQ | |||
| 3 | full_name | text(200) | no | ||||
| 4 | segment | text(40) | yes | ||||
| 5 | country | char(2) | yes |
Keys
| Kind | Name | Attributes |
|---|---|---|
| primary | pk_dim_customer | customer_key |
| unique | uq_dim_customer_id | customer_id |
Relationships
| Name | Role | Other entity | Cardinality | Attributes | Identifying | On delete | On update |
|---|---|---|---|---|---|---|---|
| fact_sales_customer | parent | fact_sales | one to many | fact_sales.customer_key -> dim_customer.customer_key | no | no_action | no_action |
Physical
bq (bigquery): public.dim_customer
Customer dimension (type 1).
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | customer_key | int64 | no | customer_key | ||||
| 2 | customer_id | string(40) | no | customer_id | ||||
| 3 | full_name | string(200) | no | full_name | ||||
| 4 | segment | string(40) | yes | segment | ||||
| 5 | country | string(2) | yes | country |
- primary key pk_dim_customer (customer_key)
- unique uq_dim_customer_id (customer_id)
dbx (databricks): default.dim_customer
Customer dimension (type 1).
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | customer_key | int | no | always | customer_key | |||
| 2 | customer_id | string | no | customer_id | ||||
| 3 | full_name | string | no | full_name | ||||
| 4 | segment | string | yes | segment | ||||
| 5 | country | string | yes | country |
- primary key pk_dim_customer (customer_key)
- unique uq_dim_customer_id (customer_id)
mysql (mysql): warehouse.dim_customer
Customer dimension (type 1).
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | customer_key | int | no | by_default | customer_key | |||
| 2 | customer_id | varchar(40) | no | customer_id | ||||
| 3 | full_name | varchar(200) | no | full_name | ||||
| 4 | segment | varchar(40) | yes | segment | ||||
| 5 | country | char(2) | yes | country |
- primary key pk_dim_customer (customer_key)
- unique uq_dim_customer_id (customer_id)
pg (postgresql): dw.dim_customer
Customer dimension (type 1).
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | customer_key | integer | no | always | customer_key | |||
| 2 | customer_id | varchar(40) | no | customer_id | ||||
| 3 | full_name | varchar(200) | no | full_name | ||||
| 4 | segment | varchar(40) | yes | segment | ||||
| 5 | country | char(2) | yes | country |
- primary key pk_dim_customer (customer_key)
- unique uq_dim_customer_id (customer_id)
rs (redshift): public.dim_customer
Customer dimension (type 1).
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | customer_key | integer | no | always | customer_key | |||
| 2 | customer_id | varchar(40) | no | customer_id | ||||
| 3 | full_name | varchar(200) | no | full_name | ||||
| 4 | segment | varchar(40) | yes | segment | ||||
| 5 | country | char(2) | yes | country |
- primary key pk_dim_customer (customer_key)
- unique uq_dim_customer_id (customer_id)
snow (snowflake): public.dim_customer
Customer dimension (type 1).
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | customer_key | number(10, 0) | no | always | customer_key | |||
| 2 | customer_id | varchar(40) | no | customer_id | ||||
| 3 | full_name | varchar(200) | no | full_name | ||||
| 4 | segment | varchar(40) | yes | segment | ||||
| 5 | country | char(2) | yes | country |
- primary key pk_dim_customer (customer_key)
- unique uq_dim_customer_id (customer_id)