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 Name

Data Type

Description

Linked Table

Availability for Export in the

Payment Mode

Template

bill_amount

double

The total amount of the transaction for which the payment has been done.

_

Yes; Measure Name: Bill Amount

bill_discount

double

Total discount applied on the bill. Possible values are flat discount, percentage discount, etc.

_

Yes; Measure Name: Bill Discount

bill_id

bigint

Unique identifier assigned to a bill internally by Capillary system. It is the primary key of this table.

_

Yes; Measure Name: Bill Id

bill_number

string

A 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_gst

double

GST tax levied by the Central Government.

_

Yes; Measure Name: Central Gst

dim_added_on_date_id

bigint

Date when the payment details had been added for the transaction.

date

Yes: Dimension Name: Added On Date > Date Id

dim_bill_outlier_status_id

bigint

Captures whether a bill, identified by its bill_id, contains outlier items.

outlier_status

Yes: Dimension Name: Bill Outlier > Id

dim_bill_type_id

bigint

Captures the type of bill for which the payment has been made. Possible values are - Regular, and Not interested.

bill_type

Yes: Dimension Name: Dim Bill Type Id

dim_cashier_id

bigint

Identifier of the cashier who processed the transaction.

cashier

Yes: Dimension Name: Cashier Id

dim_event_date_id

bigint

Date when the payment has been done.

date

Yes: Dimension Name: Date > Date

dim_event_time_id

bigint

Time when the payment has been done.

time

Yes: Dimension Name: Time > Time Id

dim_event_user_id

bigint

Identifier of the customer who has done the payment.

users

Yes: Dimension Name: User > User Id

dim_event_zone_till_id

bigint

Identifier assigned to the point-of-sale (POS) terminal within a store, where the payment has been done.

zone_tills

Yes: Dimension Name: Store Hierarchy > Till Id

dim_latest_updated_date_id

bigint

Date when the data corresponding to this event/ row is changed in the source table.

date

Yes: Dimension Name: Latest Updated Date > Date

dim_latest_updated_time_id

bigint

Time when the data corresponding to this event/ row is changed in the source table.

time

Yes: Dimension Name: Latest Updated Time > Time Id

dim_loyalty_type_id

bigint

Identifier of the Loyalty type of the customer. Possible values are - loyalty/ non loyalty/ not registered (who have not provided their contact details).

loyalty_type

Yes: Dimension Name: Loyalty > Id

dim_nps_id

bigint

Net Promoter Score (NPS) for the transaction, where NPS is a measure for customer satisfaction, ranging from 1 to 10.

nps_score

Yes: Dimension Name: Nps > Id

dim_order_channel_id

bigint

Identifier 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_channel

Yes: Dimension Name: Order Channel > Id

dim_payment_mode_id

bigint

Identifier for the mode of payment. Possible values are- Netbanking, PhonePe, Mastercard, Visa card, etc.

payment_mode

Yes: Dimension Name: Payment Mode > Id

dim_repeat_status_id

bigint

Shows if the customer has made previous purchases or if it's their first transaction.

repeat_status

Yes: Dimension Name: Repeat > Id

dim_source_type_id

bigint

Identifier for the source of the bill. Possible values are instore, e-comm, newsletter, campaigns, NCA, Wechat, Facebook, etc.

source_type

Yes: Dimension Name: Source > Id

integrated_gst

double

GST levied by the Central Government for inter-state trade.

_

Yes; Measure Name: Integrated Gst

payment_mode_amount

double

Total amount of the payment made.

_

Yes; Measure Name: Payment Mode Amount

payment_mode_details_id

bigint

Unique identifier for the payment mode details, generated by Capillary system. It is the primary key of this table.

payment_attributes

Yes; Measure Name: Payment Mode Attribute > Id

quantity

double

Total number of items in the transaction, for which the payment has been done.

_

Yes; Measure Name: Quantity

state_gst

double

Taxes levied by the State Government on the bill.

_

Yes; Measure Name: State Gst

tax_amount

double

Total amount of tax levied on the bill.

_

Yes; Measure Name: Tax Amount

year

int

Year when the payment has been done.

_

Yes: Dimension Name: Year