Coupons Fact Table

This table captures the event wherein coupons are issued to or redeemed by the customer. It captures the date and time of the coupon issual/ redemption, the associated bill amount, expiry date of the coupon, and the customer for which the coupon issual/ redemption has been done.

Databricks Table Name: coupons

Coupons - Entity Relationship Diagram (ERD)

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

Couponsauto_update_time_coupons: stringbill_id: bigintcoupon_code: stringcoupon_code_src: stringdim_campaign_group_id: bigintdim_campaign_id: bigintdim_coupon_issual_type_id: bigintdim_coupon_series_id: bigintdim_entry_type_id: bigintdim_event_date_id: bigintdim_event_time_id: bigintdim_event_user_id: bigintdim_event_zone_till_id: bigintdim_expiry_date_id: bigintdim_issual_campaign_group_id: bigintdim_issual_date_id: bigintdim_issual_time_id: bigintdim_issual_type_id: bigintdim_issual_zone_till_id: intdim_issued_to_user_id: bigintdim_latest_updated_date_id: bigintdim_latest_updated_time_id: bigintPKevent_id: bigintissual_coupon_id: bigintredemption_bill_amount: doubleused_bill_number: stringyear: intPKdim_coupon_event_type_id: bigintCoupon Issual TypeLKid: biginttype: stringCoupon Seriespurpose: stringdiscount_type: stringdescription: stringLKcoupon_series_id: bigintauto_update_campaign_base: bigintowner_valid_till_date: stringmetadata: stringcampaign: stringclient_handling_type: stringdiscount_value: stringauto_update_voucher_series: bigintcampaign_id: bigintexpiry_strategy_type: stringvalid_till_date: stringseries_type: stringseries_id: stringdiscount_code: bigintexpiry_strategy_value: stringauto_update_owner_info: bigintEntry TypeLKid: bigintvalue: stringCampaign Groupis_recurring: stringcampaign_end_date: stringgroup_version_number: stringgroup_type: stringname: stringLKid: bigintcampaign: stringcampaign_start_date: stringroi_type: stringCampaignsis_recurring: stringcampaign_end_date: stringis_migrated: stringauto_update_campaign: bigintLKcampaign_id: bigintcampaign_type: stringroi_type: stringcampaign_start_date: stringname: stringdateLKdate_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: stringDateTimeLKtime_id: biginttime: stringhour_of_day: intminute_of_day: intday_shift: stringday_shift_no: inthour_range: stringTimeusersauto_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: bigintUsersCampaign GroupCampaignsCouponsCoupon SeriesCoupon Issual TypeEntry TypeZone_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 TillsEntry TypeLKid: bigintstatus: stringRedeemed Status

Legend

PK   Primary Key

LK   Linking Key

Fact Table
Dimension Table

Coupons Fact Table

Column NameData TypeDescription NewLinked TableAvailability for Export in the Coupons template
auto_update_time
_coupons
stringDate and time when the corresponding record in the coupons table available at the source was last updated. It is in the Unix timestamp format._Yes; Measure Name: Auto Update Time Coupons
bill_idbigintIdentifier for the bill against which the coupons have been issued or redeemed._Yes; Measure Name: Bill Id
coupon_codestringA unique identifier generated for the coupons._Yes; Measure Name: Coupon Code
coupon_code_srcstringRepresents the source coupon code. It is the same as the coupon code._Yes; Measure Name: Coupon Code Src
dim_campaign_group_idbigintIdentifier for the campaign group (test or control) for which the coupon has been issued or redeemed.campaign_groupYes; Dimension Name: Campaign Group
dim_campaign_idbigintIdentifier for the campaign for which the coupon has been issued or redeemed.campaignsYes; Dimension Name: Campaign Id
dim_coupon_issual
_type_id
bigintIdentifier of the type of coupon issued. Possible values are - Single, and Bulk. Single: A single coupon is issued, in response to a specific event. Bulk: Multiple coupons are issued simultaneously.coupon_issual
_type Link
Yes; Dimension Name: Coupon Issual Type
dim_coupon_series_idbigintIdentifier of the coupon series against which the coupon has been issued or redeemed.coupon_seriesYes; Dimension Name: Coupon Series
dim_entry_type_idbigintCaptures the entry type for the coupon, whether it is a manual entry or through Intouch.entry_typeYes; Dimension Name: Entry Type
dim_event_date_idbigintDate when the coupon issual or redemption has occurred.dateYes; Dimension Name: Date
dim_event_time_idbigintTime when the coupon issual or redemption has occurred.timeYes; Dimension Name: Time
dim_event_user_idbigintIdentifier of the user, set internally by Capillary.usersYes; Dimension Name: User Id
dim_event_zone_till_idbigintIdentifier assigned to the point-of-sale (POS) terminal within a store, where the coupon was issued/redeemed. It distinguishes one checkout location from another within the same store.zone_tillsYes; Dimension Name: Store Hierarchy > Till Id
dim_expiry_date_idbigintDate when the coupon is set to expire.dateYes; Dimension Name: Expiry Date
dim_issual_campaign
_group_id
bigintIdentifier for the campaign group associated with the coupon issual.campaign_groupYes; Dimension Name: Campaign Group
dim_issual_date_idbigintDate when the coupon has been issued.dateYes; Dimension Name: Issual Date
dim_issual_time_idbigintTime when the coupon has been issued.timeYes; Dimension Name: Issual Time
dim_issual_type_idbigintCaptures the issual type. Possible values are store and customer.coupon_issual
_type Link
Yes; Dimension Name: Issual Type
dim_issual_zone_till_idintIdentifier assigned to the point-of-sale (POS) terminal within a store, where the coupon was issued. It distinguishes one checkout location from another within the same store.zone_tillsYes; Dimension Name: Issual Zone Till
dim_issued_to_user_idbigintIdentifier of the customer to whom the coupon has been issued.usersYes; Dimension Name: User Id
dim_latest_updated
_date_id
bigintDate when the data corresponding to this event/row is changed in the source table.dateYes; Measure Name: Latest Updated Date
dim_latest_updated
_time_id
bigintTime when the data corresponding to this event/row is changed in the source table.timeYes; Measure Name: Latest Updated Time
event_idbigintUnique identifier of the coupons issual/redemption event, It is the primary key of this table._Yes; Measure Name: Event Id
issual_coupon_idbigintUnique identifier assigned to the coupon which has been issued._Yes; Measure Name: Issual Coupon Id
redemption_bill_amountdoubleTotal transaction amount of the bill against which the coupon has been redeemed._Yes; Measure Name: Redemption Bill Amount
used_bill_numberstringBill number used while redeeming the coupon._Yes; Measure Name: Used Bill Number
yearintYear when the coupon was issued/redeemed._Yes; Dimension Name: Year
dim_coupon_event
_type_id
bigintIdentifier for the coupons event type (issual, redemption). It is the primary key of this table.redeemed_statusYes; Dimension Name: Coupon Event Type