Entity fact_sales

One row per sold line item.

Stereotype: fact

Subject areas: Sales Star

Attributes

#NameTypeNullDefaultKeyTermsDescription
1sales_keybigintnoPK
2date_keyintegernoFK
3customer_keyintegernoFK
4product_keyintegernoFK
5store_keyintegernoFK
6quantityintegerno
7gross_amountdomain measure (decimal(18, 4))no0
8discount_amountdomain measure (decimal(18, 4))no0
9net_amountdomain measure (decimal(18, 4))no0
10tax_amountdomain measure (decimal(18, 4))no0

Keys

KindNameAttributes
primarypk_fact_salessales_key

Relationships

NameRoleOther entityCardinalityAttributesIdentifyingOn deleteOn update
fact_sales_customerchilddim_customerone to manyfact_sales.customer_key -> dim_customer.customer_keynono_actionno_action
fact_sales_datechilddim_dateone to manyfact_sales.date_key -> dim_date.date_keynono_actionno_action
fact_sales_productchilddim_productone to manyfact_sales.product_key -> dim_product.product_keynono_actionno_action
fact_sales_storechilddim_storeone to manyfact_sales.store_key -> dim_store.store_keynono_actionno_action

Physical

bq (bigquery): public.fact_sales

One row per sold line item.

Options: cluster_by=customer_key, partition_by=RANGE_BUCKET(date_key, GENERATE_ARRAY(20200101, 20301231, 10000))

#NameTypeNullDefaultIdentityCollationAttributeComment
1sales_keyint64nosales_key
2date_keyint64nodate_key
3customer_keyint64nocustomer_key
4product_keyint64noproduct_key
5store_keyint64nostore_key
6quantityint64noquantity
7gross_amountnumeric(18, 4)no0gross_amount
8discount_amountnumeric(18, 4)no0discount_amount
9net_amountnumeric(18, 4)no0net_amount
10tax_amountnumeric(18, 4)no0tax_amount

dbx (databricks): default.fact_sales

One row per sold line item.

Options: partition_by=date_key

#NameTypeNullDefaultIdentityCollationAttributeComment
1sales_keybigintnoalwayssales_key
2date_keyintnodate_key
3customer_keyintnocustomer_key
4product_keyintnoproduct_key
5store_keyintnostore_key
6quantityintnoquantity
7gross_amountdecimal(18, 4)no0gross_amount
8discount_amountdecimal(18, 4)no0discount_amount
9net_amountdecimal(18, 4)no0net_amount
10tax_amountdecimal(18, 4)no0tax_amount

mysql (mysql): warehouse.fact_sales

One row per sold line item.

Options: engine=InnoDB

#NameTypeNullDefaultIdentityCollationAttributeComment
1sales_keybigintnoby_defaultsales_key
2date_keyintnodate_key
3customer_keyintnocustomer_key
4product_keyintnoproduct_key
5store_keyintnostore_key
6quantityintnoquantity
7gross_amountdecimal(18, 4)no0gross_amount
8discount_amountdecimal(18, 4)no0discount_amount
9net_amountdecimal(18, 4)no0net_amount
10tax_amountdecimal(18, 4)no0tax_amount

Partitioned by hash (date_key): p0, p1, p2, p3

pg (postgresql): dw.fact_sales

One row per sold line item.

#NameTypeNullDefaultIdentityCollationAttributeComment
1sales_keybigintnoalwayssales_key
2date_keyintegernodate_key
3customer_keyintegernocustomer_key
4product_keyintegernoproduct_key
5store_keyintegernostore_key
6quantityintegernoquantity
7gross_amountnumeric(18, 4)no0gross_amount
8discount_amountnumeric(18, 4)no0discount_amount
9net_amountnumeric(18, 4)no0net_amount
10tax_amountnumeric(18, 4)no0tax_amount

Partitioned by range (date_key): fact_sales_2024, fact_sales_2025

rs (redshift): public.fact_sales

One row per sold line item.

Options: distkey=customer_key, sortkey=date_key

#NameTypeNullDefaultIdentityCollationAttributeComment
1sales_keybigintnoalwayssales_key
2date_keyintegernodate_key
3customer_keyintegernocustomer_key
4product_keyintegernoproduct_key
5store_keyintegernostore_key
6quantityintegernoquantity
7gross_amountnumeric(18, 4)no0gross_amount
8discount_amountnumeric(18, 4)no0discount_amount
9net_amountnumeric(18, 4)no0net_amount
10tax_amountnumeric(18, 4)no0tax_amount

snow (snowflake): public.fact_sales

One row per sold line item.

Options: cluster_by=date_key

#NameTypeNullDefaultIdentityCollationAttributeComment
1sales_keynumber(19, 0)noalwayssales_key
2date_keynumber(10, 0)nodate_key
3customer_keynumber(10, 0)nocustomer_key
4product_keynumber(10, 0)noproduct_key
5store_keynumber(10, 0)nostore_key
6quantitynumber(10, 0)noquantity
7gross_amountnumber(18, 4)no0gross_amount
8discount_amountnumber(18, 4)no0discount_amount
9net_amountnumber(18, 4)no0net_amount
10tax_amountnumber(18, 4)no0tax_amount