Gift Card User Dimension Table
ZTZenoti Docs Team Updated April 10, 2026 1 min readGuide
Dimension table storing denormalized gift card purchase details per user, including card value, purchase price, expiration, and closure status. Populated from gift card sale transactional data.
Columns
| Column Name | Data Type | Nullable | Description |
|---|---|---|---|
| giftcarduserwid | BIGINT IDENTITY | No | Surrogate warehouse key for the gift card user dimension |
| giftcarduserid | VARCHAR(36) | Yes | Unique identifier of the user-gift card association |
| giftcardid | VARCHAR(36) | Yes | Identifier of the gift card |
| userid | VARCHAR(36) | Yes | Identifier of the guest/user who owns the gift card |
| salebyid | VARCHAR(36) | Yes | Identifier of the employee who sold the gift card |
| purchasedate | TIMESTAMP | Yes | Timestamp when the gift card was purchased |
| expirationdate | TIMESTAMP | Yes | Timestamp when the gift card expires |
| centerid | VARCHAR(36) | Yes | Identifier of the center where the gift card was sold |
| void | SMALLINT | Yes | Soft-delete flag; 1 means the record is logically deleted |
| closed | SMALLINT | Yes | Flag indicating whether the gift card has been closed out |
| closedon | TIMESTAMP | Yes | Timestamp when the gift card was closed |
| closedby | VARCHAR(36) | Yes | Identifier of the user who closed the gift card |
| giftcardvalue | NUMERIC(19,4) | Yes | Face value of the gift card |
| giftcardpurchaseprice | NUMERIC(19,4) | Yes | Actual purchase price paid for the gift card |
| isgiftcard | BOOLEAN | Yes | Flag distinguishing gift cards from other prepaid instruments |
| giftcardcode | VARCHAR(512) | Yes | Unique code printed on or associated with the gift card |
| firstname | VARCHAR(512) | Yes | First name of the gift card owner |
| lastname | VARCHAR(512) | Yes | Last name of the gift card owner |
Note: All dimension tables also include standard ETL metadata columns (
podname,organizationid,groupid,etlLastUpdatedOn,etlLastUpdatedBy) which are omitted from this reference for brevity.
Primary Key
giftcarduserwid
Foreign Keys
| Column | References |
|---|---|
| userid | Bi_DimUser / Bi_DimGuest |
| giftcardid | Gift card reference |
| salebyid | Bi_DimEmployee |
| centerid | Bi_DimCenter |
Enumerator Values
None.
Was this article helpful?
Your feedback helps us improve our documentation.