Payment Details Fact Table

This table captures the payment details of transactions, such as the bill amount, customer details, the mode of payment, taxes and discount details, cashier id, NPS value, loyalty type of the customer, and the store where the transaction is done.

Databricks Table Name: payment_details_fact

Payment Details Fact - Entity Relationship Diagram (ERD)

Zoom in the table for more clarity. Click the table title to view its details.

Payment Details Factbill_amount: doublebill_discount: doublePKbill_id: bigintbill_number: stringcentral_gst: doubledim_added_on_date_id: bigintdim_bill_outlier_status_id: bigintdim_bill_type_id: bigintdim_cashier_id: bigintdim_event_date_id: bigintdim_event_time_id: bigintdim_event_user_id: bigintdim_event_zone_till_id: bigintdim_latest_updated_date_id: bigintdim_latest_updated_time_id: bigintdim_loyalty_type_id: bigintdim_nps_id: bigintdim_order_channel_id: bigintdim_payment_mode_id: bigintdim_repeat_status_id: bigintdim_source_type_id: bigintintegrated_gst: doublepayment_mode_amount: doublePKpayment_mode_details_id: bigintquantity: doublestate_gst: doubletax_amount: doubleyear: intBill TypeLKid: bigintvalue: stringPayment ModeLKid: bigintlabel: stringPayment Details FactBill TypePayment ModeDateLKdate_id: intday_of_month: intweek_of_year: intmonth: stringyear: intquarter: stringweek_number: intweek_start_date: stringweek_end_date: stringday_of_week: stringmonth_no: intmonth_no_of_year: intmonth_of_year: stringday_of_week_no: intquarter_no: intyearly_quarter_no: intdate: stringTimeLKtime_id: biginttime: stringhour_of_day: intminute_of_day: intday_shift: stringday_shift_no: inthour_range: stringCashierLKid: bigintvalue: stringDateTimeCashierOutlier_statusLKid: bigintstatus: stringZone_tillsstore_country: stringexternal_id_1: stringstore: stringauto_update_till_parent: bigintarea: stringstore_name: stringstore_city: stringstore_state: stringtill: stringauto_update_till_store_relation: bigintis_ffc_enabled: stringLKtill_id: biginttype: stringtill_description: stringauto_update_till: bigintstore_channel: stringexternal_id: stringis_billable: stringstore_id: bigintis_active: stringauto_update_store: bigintstore_description: stringlatitude: stringtimezone: stringexternal_id_2: stringtill_name: stringzone_name: stringZone TillsOutlier Statususersauto_update_merged_customer: bigintauto_update_loyalty: bigintfraud_status: stringtest_control_bucket: stringis_merged_customer: stringsubscription_status_email_bulk: stringfirst_name: stringslab_name: stringsubscription_status_wechat_bulk: stringemail: stringlast_name: stringmerged_user_id: bigintLKuser_id: bigintsubscription_status_wechat_trans: stringsubscription_status_sms_bulk: stringndnc_status: stringsubscription_status_email_trans: stringtest_control_status: stringauto_update_fraud_user: bigintis_inactive: stringsource: stringslab_number: intauto_update_users: bigintregistered_till_id: bigintauto_update_customer_enrollment: bigintslab_expiry_date: stringcustomer_external_id: stringsubscription_status_sms_trans: stringmobile: stringloyalty_type: stringauto_update_ndnc_status: bigintUsersLoyalty_typeLKid: biginttype: stringNPS_scoreLKid: bigintscore: stringOrder_channelLKid: bigintvalue: stringauto_update_time: bigintRepeat_statusLKid: bigintstatus: stringLoyalty TypeOrder ChannelRepeat StatusNPS ScoreSource_typeLKid: biginttype: stringSource Type

Legend

PK   Primary Key

LK   Linking Key

Fact Table
Dimension Table
Source_typeLKid: bigintattribute_id: bigintattribute_name: stringvalue: stringauto_update_time_payment_attr: bigintPayment Attributes

Payment Details Fact Table

Column NameData TypeDescriptionLinked TableAvailability for Export in the Payment Mode Template
bill_amountdoubleThe total amount of the transaction for which the payment has been done._Yes; Measure Name: Bill Amount
bill_discountdoubleTotal discount applied on the bill. Possible values are flat discount, percentage discount, etc._Yes; Measure Name: Bill Discount
bill_idbigintUnique identifier assigned to a bill internally by Capillary system. It is the primary key of this table._Yes; Measure Name: Bill Id
bill_numberstringA unique number for a transaction that is either auto-generated at the POS machine (billing counter) or provided manually._Yes; Measure Name: Bill Number
central_gstdoubleGST tax levied by the Central Government._Yes; Measure Name: Central Gst
dim_added_on_date_idbigintDate when the payment details had been added for the transaction.dateYes: Dimension Name: Added On Date > Date Id
dim_bill_outlier_status_idbigintCaptures whether a bill, identified by its bill_id, contains outlier items.outlier_statusYes: Dimension Name: Bill Outlier > Id
dim_bill_type_idbigintCaptures the type of bill for which the payment has been made. Possible values are - Regular, and Not interested.bill_typeYes: Dimension Name: Dim Bill Type Id
dim_cashier_idbigintIdentifier of the cashier who processed the transaction.cashierYes: Dimension Name: Cashier Id
dim_event_date_idbigintDate when the payment has been done.dateYes: Dimension Name: Date > Date
dim_event_time_idbigintTime when the payment has been done.timeYes: Dimension Name: Time > Time Id
dim_event_user_idbigintIdentifier of the customer who has done the payment.usersYes: Dimension Name: User > User Id
dim_event_zone_till_idbigintIdentifier assigned to the point-of-sale (POS) terminal within a store, where the payment has been done.zone_tillsYes: Dimension Name: Store Hierarchy > Till Id
dim_latest_updated_date_idbigintDate when the data corresponding to this event/ row is changed in the source table.dateYes: Dimension Name: Latest Updated Date > Date
dim_latest_updated_time_idbigintTime when the data corresponding to this event/ row is changed in the source table.timeYes: Dimension Name: Latest Updated Time > Time Id
dim_loyalty_type_idbigintIdentifier of the Loyalty type of the customer. Possible values are - loyalty/ non loyalty/ not registered (who have not provided their contact details).loyalty_typeYes: Dimension Name: Loyalty > Id
dim_nps_idbigintNet Promoter Score (NPS) for the transaction, where NPS is a measure for customer satisfaction, ranging from 1 to 10.nps_scoreYes: Dimension Name: Nps > Id
dim_order_channel_idbigintIdentifier for the order channel associated with a transaction. It indicates the specific channel through which the transaction was completed. Possible values are online, in-store, through a mobile app, etc.order_channelYes: Dimension Name: Order Channel > Id
dim_payment_mode_idbigintIdentifier for the mode of payment. Possible values are- Netbanking, PhonePe, Mastercard, Visa card, etc.payment_modeYes: Dimension Name: Payment Mode > Id
dim_repeat_status_idbigintShows if the customer has made previous purchases or if it's their first transaction.repeat_statusYes: Dimension Name: Repeat > Id
dim_source_type_idbigintIdentifier for the source of the bill. Possible values are instore, e-comm, newsletter, campaigns, NCA, Wechat, Facebook, etc.source_typeYes: Dimension Name: Source > Id
integrated_gstdoubleGST levied by the Central Government for inter-state trade._Yes; Measure Name: Integrated Gst
payment_mode_amountdoubleTotal amount of the payment made._Yes; Measure Name: Payment Mode Amount
payment_mode_details_idbigintUnique identifier for the payment mode details, generated by Capillary system. It is the primary key of this table.payment_attributesYes; Measure Name: Payment Mode Attribute > Id
quantitydoubleTotal number of items in the transaction, for which the payment has been done._Yes; Measure Name: Quantity
state_gstdoubleTaxes levied by the State Government on the bill._Yes; Measure Name: State Gst
tax_amountdoubleTotal amount of tax levied on the bill._Yes; Measure Name: Tax Amount
yearintYear when the payment has been done._Yes: Dimension Name: Year